{"_id":"to-integer","_rev":"5-f2136ae9acd650d1a4ec52e979db4c57","name":"to-integer","description":"Converts the given value to an integer. ","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.0":{"name":"to-integer","version":"0.0.0","description":"Converts value to an integer.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bubkoo/to-integer.git"},"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com","url":"https://github.com/bubkoo"},"license":"MIT","bugs":{"url":"https://github.com/bubkoo/to-integer/issues"},"homepage":"https://github.com/bubkoo/to-integer#readme","gitHead":"d081258f461795e42434538e38b30d5b475974a1","_id":"to-integer@0.0.0","_shasum":"60da24c3f861768b2d98806c2f3afd4ab68c62ca","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"60da24c3f861768b2d98806c2f3afd4ab68c62ca","tarball":"https://registry.npmjs.org/to-integer/-/to-integer-0.0.0.tgz","integrity":"sha512-JwjZrfmXK90t7Sm7yEEhJxQRC6goDJy+RVCc42MUUyV35iNw9aNcC1pXymEN2TIUXlUfmRqkpCCrmNwtVmexoA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6E44o8pB4u1Jnhc/UkfwCWnaiI9MvpKvXiNkLTxf1QgIhAO4etivQQUwL8nqfegVCG8kjsGHEi7K0EWu2e5b69C3y"}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/to-integer-0.0.0.tgz_1460516151653_0.1660591613035649"}},"1.0.0":{"name":"to-integer","version":"1.0.0","description":"Converts the given value to an integer. ","main":"index.js","scripts":{"lint":"jshint index.js","pretest":"npm run lint","test":"mocha -R spec","test:cov":"rm -rf ./test/coverage && istanbul cover _mocha --dir ./test/coverage -- -R spec","test:rpt":"npm run test:cov && coveralls < ./test/coverage/lcov.info","prepublish":"npm test"},"keywords":["to","parse","convert","converter","parser","type","number","length","int","integer","float","decimal","binary","octal","hex","NaN","infinity"],"repository":{"type":"git","url":"git+https://github.com/bubkoo/to-integer.git"},"license":"MIT","bugs":{"url":"https://github.com/bubkoo/to-integer/issues"},"homepage":"https://github.com/bubkoo/to-integer#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5"},"dependencies":{"is-function":"^1.0.1","is-nil":"^1.0.0","is-object":"^1.0.1","is-symbol":"^1.0.1"},"gitHead":"108df6bb81491b2b465cd313c5207877219c50ef","_id":"to-integer@1.0.0","_shasum":"9d401a4f09a8f4f0e645f5e8d7ecafecc422f890","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"9d401a4f09a8f4f0e645f5e8d7ecafecc422f890","tarball":"https://registry.npmjs.org/to-integer/-/to-integer-1.0.0.tgz","integrity":"sha512-e0TV8poqVKqkOPGuVOGCWseTIB1rIGPD31+305lyn07y2Ft4p0r8gZH78oGJBR7jARajH3lAYodMXfsUyOjt6w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBAz6oR1nImxwgWxRIPyFnvBt8amkr4cXrYoKE3Le0URAiBRnsA8rv/UucQJ2KKhTInJXMGTsFv7EYOQYssi1BJqsw=="}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/to-integer-1.0.0.tgz_1460542251589_0.6298024060670286"}},"1.0.1":{"name":"to-integer","version":"1.0.1","description":"Converts the given value to an integer. ","main":"index.js","scripts":{"lint":"jshint index.js","pretest":"npm run lint","test":"mocha -R spec","test:cov":"rm -rf ./test/coverage && istanbul cover _mocha --dir ./test/coverage -- -R spec","test:rpt":"npm run test:cov && coveralls < ./test/coverage/lcov.info","prepublish":"npm test"},"keywords":["to","parse","convert","converter","parser","type","number","length","int","integer","float","decimal","binary","octal","hex","NaN","infinity"],"repository":{"type":"git","url":"git+https://github.com/gearcase/to-integer.git"},"license":"MIT","bugs":{"url":"https://github.com/gearcase/to-integer/issues"},"homepage":"https://github.com/gearcase/to-integer#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5"},"dependencies":{"is-function":"^1.0.1","is-nil":"^1.0.0","is-object":"^1.0.1","is-symbol":"^1.0.1"},"gitHead":"0b84274519f33685d03de7c5f50b832119fcd860","_id":"to-integer@1.0.1","_shasum":"511ad41dce6a93730a8f3b6e35a164fd829464da","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"511ad41dce6a93730a8f3b6e35a164fd829464da","tarball":"https://registry.npmjs.org/to-integer/-/to-integer-1.0.1.tgz","integrity":"sha512-mv4Nwp8Y28xLp1rdYgnlV4NqYBn23lIitU2fqCtyrLXlwsC6th3Aq37JRe7qfuROMJv66kAZG8V9NR1HIgwOUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBl1voKJ4jqd7fIq+F32WF87qneEtTi2y9pYMUI9aVYgIgN+okutZ+09dPpc/lIzUo8q13WO+efgS1Y0FzJnx+1Hg="}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/to-integer-1.0.1.tgz_1460698296450_0.8006454627029598"}}},"readme":"# to-integer\n\n> Converts the given value to an integer. \n\n\n[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/gearcase/to-integer/blob/master/LICENSE)\n\n[![build:?](https://img.shields.io/travis/gearcase/to-integer/master.svg?style=flat-square)](https://travis-ci.org/gearcase/to-integer)\n[![coverage:?](https://img.shields.io/coveralls/gearcase/to-integer/master.svg?style=flat-square)](https://coveralls.io/github/gearcase/to-integer)\n\n\n## Install\n\n```\n$ npm install --save to-integer \n```\n\n\n## Usage\n\n> For more use-cases see the [tests](https://github.com/gearcase/to-integer/blob/master/test/spec/index.js)\n\n```js\nvar toInteger = require('to-integer');\n\ntoInteger(1);                // => 1\ntoInteger();                 // => 0\ntoInteger(null);             // => 0\ntoInteger(Number.MAX_VALUE); // => Number.MAX_VALUE\ntoInteger(Infinity);         // => Infinity\n\n// boolean\ntoInteger(true);  // => 1\ntoInteger(false); // => 0\n\n// string\ntoInteger('1');      // => 1\ntoInteger('0');      // => 0\ntoInteger('-1');     // => -1\ntoInteger('1.1000'); // => 1\ntoInteger('-1.100'); // => -1\ntoInteger('01');     // => 1\ntoInteger('0.10');   // => 0\ntoInteger('1a');     // => 1\ntoInteger('a1');     // => NaN\n\n// binary\ntoInteger('0b01'); // => 1\ntoInteger('0b10'); // => 2\ntoInteger('0b11'); // => 3\ntoInteger('0b02'); // => NaN\n\n// octal\ntoInteger('0o01'); // => 1 \ntoInteger('0o07'); // => 7\ntoInteger('0o10'); // => 8\ntoInteger('0o08'); // => NaN\n\n// hex\ntoInteger('0x01');  // => 1 \ntoInteger('0x0F');  // => 15 \ntoInteger('0x0G');  // => NaN\ntoInteger('-0x01'); // => NaN\ntoInteger('+0x01'); // => NaN\n\n// object\ntoInteger(new Object(1));   // => 1\ntoInteger(new Number(1));   // => 1\ntoInteger(new Number(1.1)); // => 1\ntoInteger(function () {});  // => NaN \ntoInteger(new Object());    // => NaN\n```\n\n## Related\n\n\n- [to-num](https://github.com/gearcase/to-num) - Converts the given value to a number.\n- [to-str](https://github.com/gearcase/to-str) - Converts the given value to a string.\n- [to-length](https://github.com/gearcase/to-length) - Converts value to an integer suitable for use as the length of an array-like object.\n- [to-lower](https://github.com/gearcase/to-lower) - Converts string, as a whole, to lower case.\n- [to-upper](https://github.com/gearcase/to-upper) - Converts string, as a whole, to upper case.\n- [to-path](https://github.com/gearcase/to-path) - Converts value to a property path array. \n- [to-source-code](https://github.com/gearcase/to-source-code.git) - Converts function to its source code.\n\n\n\n## Contributing\n\nPull requests and stars are highly welcome.\n\nFor bugs and feature requests, please [create an issue](https://github.com/gearcase/to-integer/issues/new).\n","maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"time":{"modified":"2022-06-27T07:23:35.296Z","created":"2016-04-13T02:55:54.510Z","0.0.0":"2016-04-13T02:55:54.510Z","1.0.0":"2016-04-13T10:10:54.506Z","1.0.1":"2016-04-15T05:31:38.542Z"},"homepage":"https://github.com/gearcase/to-integer#readme","repository":{"type":"git","url":"git+https://github.com/gearcase/to-integer.git"},"bugs":{"url":"https://github.com/gearcase/to-integer/issues"},"license":"MIT","readmeFilename":"README.md","keywords":["to","parse","convert","converter","parser","type","number","length","int","integer","float","decimal","binary","octal","hex","NaN","infinity"]}