{"_id":"to-length","_rev":"5-ebaf0b6d2f98b3c9c2626f76b1c7e9f8","name":"to-length","description":"Converts value to an integer suitable for use as the length of an array-like object.","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.0":{"name":"to-length","version":"0.0.0","description":"Converts value to an integer suitable for use as the length of an array-like object.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bubkoo/to-length.git"},"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com","url":"https://github.com/bubkoo"},"license":"MIT","bugs":{"url":"https://github.com/bubkoo/to-length/issues"},"homepage":"https://github.com/bubkoo/to-length#readme","gitHead":"342ecc273ab06e8331b6d564800f09a51cc4e770","_id":"to-length@0.0.0","_shasum":"b2b47d2d4a1661ed26cd2cc8160a008ef34070cd","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"b2b47d2d4a1661ed26cd2cc8160a008ef34070cd","tarball":"https://registry.npmjs.org/to-length/-/to-length-0.0.0.tgz","integrity":"sha512-GbVAuiMhhAsluOSCbRFemR32eSHbXFSY8zG2JYzG9z3t3epmHpsnuLvU6aZSrMnwDGSgS90ToPMM3wqq2Sdukg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKGl0oxIvAtNYxmKQmK2lqfqeACZ1kHGw5slP9mUazWwIhAMsvwa5tbmXb9cW6JbNRUbwGEDZOfaMB0/iZhdFQ3blD"}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/to-length-0.0.0.tgz_1460477033156_0.40642705000936985"}},"1.0.0":{"name":"to-length","version":"1.0.0","description":"Converts value to an integer suitable for use as the length of an array-like object.","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","length","array","length-like","array-like","number","int","integer"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/bubkoo/to-length.git"},"bugs":{"url":"https://github.com/bubkoo/to-length/issues"},"homepage":"https://github.com/bubkoo/to-length#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5"},"dependencies":{"to-integer":"^1.0.0"},"gitHead":"40691fcecb92dc322044fbc5a345c6d3cab5547d","_id":"to-length@1.0.0","_shasum":"c95989da9fac59f505ccab1a1b4706138c34640b","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"c95989da9fac59f505ccab1a1b4706138c34640b","tarball":"https://registry.npmjs.org/to-length/-/to-length-1.0.0.tgz","integrity":"sha512-whgpwRI9eD8oqHL2kA+OYW6/pFRI4+QfwTWjKQlz6u5LnA9kZY9Ox6wy8i1zXJXDab99inc7qyaABH9hnZQF3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGWOmW4B4Ws8uGpxCKCIASukd9Mu35GIt21RWWBk11nyAiAZ403HtTiFxMPgZyhniUNbUofCNBpQV+BoAhvu1GHgKA=="}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/to-length-1.0.0.tgz_1460542412795_0.6922452328726649"}},"1.0.1":{"name":"to-length","version":"1.0.1","description":"Converts value to an integer suitable for use as the length of an array-like object.","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","length","array","length-like","array-like","number","int","integer"],"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/gearcase/to-length.git"},"bugs":{"url":"https://github.com/gearcase/to-length/issues"},"homepage":"https://github.com/gearcase/to-length#readme","devDependencies":{"jshint":"^2.9.1","chai":"^3.5.0","coveralls":"^2.11.9","istanbul":"^0.4.2","mocha":"^2.4.5"},"dependencies":{"to-integer":"^1.0.0"},"gitHead":"8a910c492b43778b0e84f42306c9e95f7a51a4a4","_id":"to-length@1.0.1","_shasum":"b8ae498c8a07fd053ee7c70789a60c0f3d03a4b5","_from":".","_npmVersion":"3.8.5","_nodeVersion":"4.4.0","_npmUser":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"dist":{"shasum":"b8ae498c8a07fd053ee7c70789a60c0f3d03a4b5","tarball":"https://registry.npmjs.org/to-length/-/to-length-1.0.1.tgz","integrity":"sha512-OAj+hE0FfPzTsGVMD3XwZx8Hyit0Df7x+0psmhfQQrMu//bFtaNShmviA3ENLx6D7o0H487yFIXDdxCGDydwig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwfLTVetIU44p7AYS6oqCJPecdOXPHBs4Q6rWT0kFwkQIhAPPp01anTKI7fxcthP1R5dwQuIu+GS0Beyys+um4IJSI"}]},"maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/to-length-1.0.1.tgz_1460698931065_0.10788886877708137"}}},"readme":"# to-length\n\n> Converts value to an integer suitable for use as the length of an array-like object. \n\n\n[![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/gearcase/to-length/blob/master/LICENSE)\n\n[![build:?](https://img.shields.io/travis/gearcase/to-length/master.svg?style=flat-square)](https://travis-ci.org/gearcase/to-length)\n[![coverage:?](https://img.shields.io/coveralls/gearcase/to-length/master.svg?style=flat-square)](https://coveralls.io/github/gearcase/to-length)\n\n\n## Install\n\n```\n$ npm install --save to-length \n```\n\n## Usage\n\n> For more use-cases see the [tests](https://github.com/gearcase/to-length/blob/master/test/spec/index.js)\n\n```js\nvar toLength = require('to-length');\n\ntoLength(3);                // => 3\ntoLength('3');              // => 3\ntoLength('abc');            // => 0\ntoLength(-2);               // => 0\ntoLength();                 // => 0\ntoLength(null);             // => 0\ntoLength(Number.MIN_VALUE); // => 0\ntoLength(Number.MAX_VALUE); // => 4294967295\ntoLength(Infinity);         // => 4294967295\n\n// boolean\ntoLength(true);  // => 1\ntoLength(false); // => 0\n```\n\n\n## Related\n\n- [is-length](https://github.com/gearcase/is-length) - Checks if the given value is a valid array-like length.\n- [is-index](https://github.com/gearcase/is-index) - Checks if the given value is a valid array-like index.\n- [drop-left](https://github.com/gearcase/drop-left) - Creates a slice of array with n elements dropped from the beginning.\n- [drop-right](https://github.com/gearcase/drop-right) - Creates a slice of array with n elements dropped from the end.\n- [pick-item](https://github.com/mock-end/pick-item) - Randomly sampling a item from an array.\n- [pick-items](https://github.com/mock-end/pick-items) - Randomly sampling some items from an array. \n- [shuffle-arr](https://github.com/mock-end/shuffle-arr) - Randomize the order of the elements in an array or array-like object. \n- [is-array-like](https://github.com/gearcase/is-array-like) - Checks if the given value is an array or array-like object.\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-length/issues/new).\n","maintainers":[{"name":"bubkoo","email":"bubkoo.wy@gmail.com"}],"time":{"modified":"2022-06-27T07:23:47.307Z","created":"2016-04-12T16:03:53.606Z","0.0.0":"2016-04-12T16:03:53.606Z","1.0.0":"2016-04-13T10:13:35.582Z","1.0.1":"2016-04-15T05:42:14.463Z"},"homepage":"https://github.com/gearcase/to-length#readme","repository":{"type":"git","url":"git+https://github.com/gearcase/to-length.git"},"author":{"name":"bubkoo","email":"bubkoo.wy@gmail.com"},"bugs":{"url":"https://github.com/gearcase/to-length/issues"},"license":"MIT","readmeFilename":"README.md","keywords":["to","parse","convert","converter","parser","type","length","array","length-like","array-like","number","int","integer"]}