autocast
Easily and automatically cast common datatypes in JavaScript
Usage
Node.js
var autocast = ;
Web
<!-- // defines autocast() -->
Example
var autocast = ;var x;x =// x => 5x =// x => 5.8x =// x => '5.8.8'x =// x => nullx =// x => undefinedx =// x => NaNx =// x => truex =// x => falsex =// x => 'normal string'
Install
npm install autocast
Tests
npm test
License
MIT Licensed