Casting
Tiny type casting library for node.js and the browser.
Installation
Via npm:
npm install --save casting
or bower:
bower install --save casting
Usage
var casting = ; casting; // [123]casting; // '123'casting; // [object Date] { thisname = valuename; thisisActive = valueisActive;} casting; casting; // [object MyType] var castAll = casting; var user = name: 123 isActive: 0; console; // {name: '123', isActive: false}
Running the tests
First, npm install
, then npm test
. Code coverage generated with npm run coverage
.
License
MIT, see LICENSE.md.