# autocast

> Easily and automatically cast common datatypes in JavaScript

Latest version **0.0.4** (published 2012-12-09) · 0 weekly downloads

## Install

```sh
npm install autocast
pnpm add autocast
yarn add autocast
bun add autocast
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2012-12-09 |
| First published | 2012-06-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Author | Dave Eddy |
| Maintainers | bahamas10 |
| Keywords | auto, cast, typecast, convert |

## Links

- npm: https://www.npmjs.com/package/autocast
- Repository: https://github.com/bahamas10/node-autocast
- npm.io page: https://npm.io/package/autocast

## Recent versions

- 0.0.4 (latest) — 2012-12-09
- 0.0.3 — 2012-08-15
- 0.0.2 — 2012-07-31
- 0.0.1 — 2012-07-07
- 0.0.0 — 2012-06-22

## README

autocast
========

Easily and automatically cast common datatypes in JavaScript

Usage
-----

Node.js

``` js
var autocast = require('autocast');
```

Web

``` html
<script src="autocast.min.js"></script>
<!-- // defines autocast() -->
```

Example
-------

``` js
var autocast = require('autocast');
var x;

x = autocast('5')
// x => 5
x = autocast('5.8')
// x => 5.8
x = autocast('5.8.8')
// x => '5.8.8'
x = autocast('null')
// x => null
x = autocast('undefined')
// x => undefined
x = autocast('NaN')
// x => NaN
x = autocast('true')
// x => true
x = autocast('false')
// x => false
x = autocast('normal string')
// x => 'normal string'
```

Install
------

    npm install autocast

Tests
-----

    npm test

License
-------

MIT Licensed

---
_Source: https://npm.io/package/autocast · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
