{"_id":"stereotype","_rev":"6-0ee11f92f6e4367c06e540fc942d8605","name":"stereotype","description":"Cast a string (where possible) to a primitive type.","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"stereotype","version":"1.0.0","description":"Cast a string (where possible) to a primitive type.","author":{"name":"Lim Yuan Qing"},"license":"MIT","repository":{"type":"git","url":"git://github.com/yuanqing/stereotype.git"},"devDependencies":{"gulp":"^3.8.0","gulp-istanbul":"^0.2.1","gulp-jasmine":"^0.3.0","gulp-jshint":"^1.8.2","gulp-plumber":"^0.6.4","jshint-stylish":"^0.4.0"},"gitHead":"74cd55f13bcc6c3e65b1378158a94c23830f799e","bugs":{"url":"https://github.com/yuanqing/stereotype/issues"},"homepage":"https://github.com/yuanqing/stereotype","_id":"stereotype@1.0.0","scripts":{},"_shasum":"555fce2b792bd485bd3d1fdefe950dae7e9e924a","_from":"./","_npmVersion":"1.4.14","_npmUser":{"name":"yuanqing","email":"hello@yuanqing.sg"},"maintainers":[{"name":"yuanqing","email":"hello@yuanqing.sg"}],"dist":{"shasum":"555fce2b792bd485bd3d1fdefe950dae7e9e924a","tarball":"https://registry.npmjs.org/stereotype/-/stereotype-1.0.0.tgz","integrity":"sha512-TPh6UOw23f6USvsNQEcsXEoh9Yn1BfZfBfif9bLoCnzrqrf/EmUejzj2wqB4aga69iYUb4EoSmnsJfhKSGCm0A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFB+eIBoGY9/vvE426+pREOh2Offugu+V2dgcDIc/Up6AiBx8d8HlLhVDbgSFzmAET3/hJUGLrcFR2X6Pc6g2A+0tQ=="}]}},"1.0.1":{"name":"stereotype","version":"1.0.1","description":"Cast a string (where possible) to a primitive type.","author":{"name":"Lim Yuan Qing"},"license":"MIT","repository":{"type":"git","url":"git://github.com/yuanqing/stereotype.git"},"devDependencies":{"istanbul":"^0.3.0","jasmine-node":"^1.14.5","jshint":"^2.5.4","jshint-stylish":"^0.4.0"},"scripts":{"cover":"istanbul cover node_modules/.bin/jasmine-node ./spec -x **/spec/**","lint":"jshint --verbose --reporter node_modules/jshint-stylish/stylish.js index.js","lint-test":"jshint --verbose --reporter node_modules/jshint-stylish/stylish.js ./spec/*.js","test":"jasmine-node spec --verbose"},"keywords":["cast","casting","string","type"],"gitHead":"1589fa3bd9342a20ef283129ef0b626c3aed9413","bugs":{"url":"https://github.com/yuanqing/stereotype/issues"},"homepage":"https://github.com/yuanqing/stereotype","_id":"stereotype@1.0.1","_shasum":"437525709c08f409be901bb3959c77442dba8971","_from":"./","_npmVersion":"1.4.14","_npmUser":{"name":"yuanqing","email":"hello@yuanqing.sg"},"maintainers":[{"name":"yuanqing","email":"hello@yuanqing.sg"}],"dist":{"shasum":"437525709c08f409be901bb3959c77442dba8971","tarball":"https://registry.npmjs.org/stereotype/-/stereotype-1.0.1.tgz","integrity":"sha512-RDZaZwBAg+RlWvb8afPL49LkSHQOYtCnnj+XvPalwXG/TK3fnSKfvcooqY9ldmPCeJuUp8LboWWndYzYvCEDtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLEi6P4Yk8Z2eEBizbUnpbQAWHDRJpCOYQi8nmfnsTfwIhAJfERNTf6mN+mKfAM+cEG0cmRjA8bPsl6oSGnHLQxYiY"}]}}},"readme":"# Stereotype.js [![npm Version](http://img.shields.io/npm/v/stereotype.svg?style=flat)](https://www.npmjs.org/package/stereotype) [![Build Status](https://img.shields.io/travis/yuanqing/stereotype.svg?style=flat)](https://travis-ci.org/yuanqing/stereotype) [![Coverage Status](https://img.shields.io/coveralls/yuanqing/stereotype.svg?style=flat)](https://coveralls.io/r/yuanqing/stereotype)\n\n> Cast a string (where possible) to a primitive type.\n\n## Usage\n\n```js\nstereotype('undefined'); //=> undefined\nstereotype('null');      //=> null\nstereotype('NaN');       //=> NaN\nstereotype('Infinity');  //=> Infinity\nstereotype('true');      //=> true\nstereotype('3.14');      //=> 3.14\nstereotype('0xFF');      //=> 255\n\nstereotype({});          //=> {}\nstereotype('foo');       //=> 'foo'\n```\n\nMore usage examples are in [the tests](https://github.com/yuanqing/stereotype/blob/master/spec/stereotype.spec.js).\n\n## API\n\n### stereotype(obj)\n\nReturns, where possible, `obj` cast to a primitive type. Otherwise returns `obj` if `obj` is not a `string`, or if `obj` cannot be cast to a primitive.\n\n## Installation\n\nInstall via [npm](https://www.npmjs.org/package/stereotype):\n\n```bash\n$ npm i --save stereotype\n```\n\n## License\n\n[MIT license](https://github.com/yuanqing/stereotype/blob/master/LICENSE)\n","maintainers":[{"name":"yuanqing","email":"hello@yuanqing.sg"}],"time":{"modified":"2022-06-27T00:21:59.075Z","created":"2014-08-11T17:37:04.533Z","1.0.0":"2014-08-11T17:37:04.533Z","1.0.1":"2014-08-23T15:04:17.851Z"},"homepage":"https://github.com/yuanqing/stereotype","repository":{"type":"git","url":"git://github.com/yuanqing/stereotype.git"},"author":{"name":"Lim Yuan Qing"},"bugs":{"url":"https://github.com/yuanqing/stereotype/issues"},"license":"MIT","readmeFilename":"README.md","keywords":["cast","casting","string","type"]}