# sc-cast

> Cast values to a specific type

Latest version **2.0.0** (published 2015-11-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install sc-cast
pnpm add sc-cast
yarn add sc-cast
bun add sc-cast
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2015-11-25 |
| First published | 2014-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | David Tsuji |
| Maintainers | sitecore, dervalp, davidtsuji |

## Links

- npm: https://www.npmjs.com/package/sc-cast
- Repository: https://github.com/SPEAKUI/sc-cast
- Homepage: https://github.com/SPEAKUI/sc-cast#readme
- Issues: https://github.com/SPEAKUI/sc-cast/issues
- npm.io page: https://npm.io/package/sc-cast

## Dependencies (2)

- [sc-is](https://npm.io/package/sc-is.md) 0.0.x
- [sc-contains](https://npm.io/package/sc-contains.md) 0.0.x

## Recent versions

- 2.0.0 (latest) — 2015-11-25
- 1.0.0 — 2015-10-16
- 0.0.8 — 2014-08-06
- 0.0.7 — 2014-08-05
- 0.0.6 — 2014-04-01
- 0.0.5 — 2014-03-31
- 0.0.4 — 2014-03-27
- 0.0.3 — 2014-03-20
- 0.0.2 — 2014-03-17
- 0.0.1 — 2014-02-20
- 0.0.0 — 2014-02-20

## README

# TOC
   - [sc-cast](#sc-cast)
<a name=""></a>
 
<a name="sc-cast"></a>
# sc-cast
Cast values to specific types.

```js
cast( "[1,2,3]", "array" ).should.eql( [ 1, 2, 3 ] );
cast( "false", "boolean" ).should.eql( false );
cast( "29 aug 1997", "date" ).should.eql( new Date( 1997, 7, 29 ) );
cast( "-42", "number" ).should.eql( -42 );
cast( true, "string" ).should.eql( "true" );
```

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