{"_id":"parse-numeric-range","_rev":"3262179","name":"parse-numeric-range","description":"Takes a string, such as \"1,2,3-10,5-8\" and turns it into an array of numbers","dist-tags":{"latest":"1.3.0"},"maintainers":[{"name":"euank","email":"euank@clemson.edu"}],"time":{"modified":"2024-03-21T09:46:54.000Z","created":"2014-06-19T09:37:50.619Z","1.3.0":"2021-08-22T03:50:34.458Z","1.2.0":"2020-04-28T02:22:55.467Z","1.1.0":"2020-04-10T02:01:37.022Z","1.0.0":"2020-04-10T01:57:49.781Z","0.0.2":"2014-12-02T05:40:04.158Z","0.0.1":"2014-06-19T09:37:50.619Z"},"users":{},"author":{"name":"Euan Kemp"},"repository":{"type":"git","url":"git+https://github.com/euank/node-parse-numeric-range.git"},"versions":{"1.3.0":{"name":"parse-numeric-range","version":"1.3.0","description":"Takes a string, such as \"1,2,3-10,5-8\" and turns it into an array of numbers","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha --require esm"},"keywords":["parse","numbers","ranges","utility","arrays"],"author":{"name":"Euan Kemp"},"license":"ISC","homepage":"https://github.com/euank/node-parse-numeric-range","repository":{"type":"git","url":"git+https://github.com/euank/node-parse-numeric-range.git"},"devDependencies":{"chai":"*","mocha":"*","esm":"*"},"gitHead":"6728dcfb8b4681eb6986ce7ca13a2ee190222fcc","bugs":{"url":"https://github.com/euank/node-parse-numeric-range/issues"},"_id":"parse-numeric-range@1.3.0","_nodeVersion":"10.19.0","_npmVersion":"6.13.4","dist":{"shasum":"7c63b61190d61e4d53a1197f0c83c47bb670ffa3","size":2504,"noattachment":false,"key":"/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-numeric-range/download/parse-numeric-range-1.3.0.tgz"},"_npmUser":{"name":"euank","email":"euank@euank.com"},"directories":{},"maintainers":[{"name":"euank","email":"euank@clemson.edu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-numeric-range_1.3.0_1629604234324_0.8822120937745326"},"_hasShrinkwrap":false,"publish_time":1629604234458,"_cnpm_publish_time":1629604234458,"_cnpmcore_publish_time":"2021-12-16T18:45:25.526Z"},"1.2.0":{"name":"parse-numeric-range","version":"1.2.0","description":"Takes a string, such as \"1,2,3-10,5-8\" and turns it into an array of numbers","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha --require esm"},"keywords":["parse","numbers","ranges","utility","arrays"],"author":{"name":"Euan Kemp"},"license":"ISC","homepage":"https://github.com/euank/node-parse-numeric-range","repository":{"type":"git","url":"git+https://github.com/euank/node-parse-numeric-range.git"},"devDependencies":{"chai":"*","mocha":"*","esm":"*"},"gitHead":"df9255040cc177ef1b3e4db561a8f6aaa20a7cc9","bugs":{"url":"https://github.com/euank/node-parse-numeric-range/issues"},"_id":"parse-numeric-range@1.2.0","_npmVersion":"5.8.0","_nodeVersion":"10.15.2","_npmUser":{"name":"euank","email":"euank@euank.com"},"dist":{"shasum":"aa70b00f29624ed13e9f943e9461b306e386b0fa","size":2417,"noattachment":false,"key":"/parse-numeric-range/-/parse-numeric-range-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-numeric-range/download/parse-numeric-range-1.2.0.tgz"},"maintainers":[{"name":"euank","email":"euank@clemson.edu"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-numeric-range_1.2.0_1588040575368_0.3721616770362557"},"_hasShrinkwrap":false,"publish_time":1588040575467,"_cnpm_publish_time":1588040575467,"_cnpmcore_publish_time":"2021-12-16T18:45:25.921Z"},"1.1.0":{"name":"parse-numeric-range","version":"1.1.0","description":"Takes a string, such as \"1,2,3-10,5-8\" and turns it into an array of numbers","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha --require esm"},"keywords":["parse","numbers","ranges","utility","arrays"],"author":{"name":"Euan Kemp"},"license":"ISC","homepage":"https://github.com/euank/node-parse-numeric-range","repository":{"type":"git","url":"git+https://github.com/euank/node-parse-numeric-range.git"},"devDependencies":{"chai":"*","mocha":"*","esm":"*"},"gitHead":"f1e26367439294f94baeaacdd87b07608065b72a","bugs":{"url":"https://github.com/euank/node-parse-numeric-range/issues"},"_id":"parse-numeric-range@1.1.0","_npmVersion":"5.8.0","_nodeVersion":"10.15.2","_npmUser":{"name":"euank","email":"euank@euank.com"},"dist":{"shasum":"5f948a0b10fdaec0835761db561ddb84448925f7","size":2372,"noattachment":false,"key":"/parse-numeric-range/-/parse-numeric-range-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-numeric-range/download/parse-numeric-range-1.1.0.tgz"},"maintainers":[{"name":"euank","email":"euank@clemson.edu"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-numeric-range_1.1.0_1586484096919_0.8339929076964316"},"_hasShrinkwrap":false,"publish_time":1586484097022,"_cnpm_publish_time":1586484097022,"_cnpmcore_publish_time":"2021-12-16T18:45:26.129Z"},"1.0.0":{"name":"parse-numeric-range","version":"1.0.0","description":"Takes a string, such as \"1,2,3-10,5-8\" and turns it into an array of numbers","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha --require esm"},"keywords":["parse","numbers","ranges","utility","arrays"],"author":{"name":"Euan Kemp"},"license":"ISC","homepage":"https://github.com/euank/node-parse-numeric-range","repository":{"type":"git","url":"git+https://github.com/euank/node-parse-numeric-range.git"},"devDependencies":{"chai":"*","mocha":"*","esm":"*"},"gitHead":"fe8b5f44d8f640b48248a9450cc63f73be9547ab","bugs":{"url":"https://github.com/euank/node-parse-numeric-range/issues"},"_id":"parse-numeric-range@1.0.0","_npmVersion":"5.8.0","_nodeVersion":"10.15.2","_npmUser":{"name":"euank","email":"euank@euank.com"},"dist":{"shasum":"bd9472ec6642ef7e80a007396712922a95e12f21","size":2297,"noattachment":false,"key":"/parse-numeric-range/-/parse-numeric-range-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-numeric-range/download/parse-numeric-range-1.0.0.tgz"},"maintainers":[{"name":"euank","email":"euank@clemson.edu"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-numeric-range_1.0.0_1586483869677_0.8358431717858246"},"_hasShrinkwrap":false,"publish_time":1586483869781,"_cnpm_publish_time":1586483869781,"_cnpmcore_publish_time":"2021-12-16T18:45:26.340Z"},"0.0.2":{"name":"parse-numeric-range","version":"0.0.2","description":"Takes a string, such as \"1,2,3-10,5-8\" and turns it into an array of numbers","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha"},"keywords":["parse","numbers","ranges","utility","arrays"],"author":{"name":"Euank"},"license":"ISC","homepage":"https://github.com/euank/node-parse-numeric-range","repository":{"type":"git","url":"https://github.com/euank/node-parse-numeric-range.git"},"devDependencies":{"chai":"*","mocha":"*"},"gitHead":"59d5b77af655a11f0457b7ea0213bd2bbc5d2d44","bugs":{"url":"https://github.com/euank/node-parse-numeric-range/issues"},"_id":"parse-numeric-range@0.0.2","_shasum":"b4f09d413c7adbcd987f6e9233c7b4b210c938e4","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"euank","email":"euank@clemson.edu"},"maintainers":[{"name":"euank","email":"euank@clemson.edu"}],"dist":{"shasum":"b4f09d413c7adbcd987f6e9233c7b4b210c938e4","size":2686,"noattachment":false,"key":"/parse-numeric-range/-/parse-numeric-range-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-numeric-range/download/parse-numeric-range-0.0.2.tgz"},"directories":{},"publish_time":1417498804158,"_hasShrinkwrap":false,"_cnpm_publish_time":1417498804158,"_cnpmcore_publish_time":"2021-12-16T18:45:26.636Z"},"0.0.1":{"name":"parse-numeric-range","version":"0.0.1","description":"Takes a string, such as \"1,2,3-10,5-8\" and turns it into an array of numbers","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha"},"keywords":["parse","numbers","ranges","utility","arrays"],"author":{"name":"Euank"},"license":"ISC","homepage":"https://github.com/euank/node-parse-numeric-range","repository":{"type":"git","url":"https://github.com/euank/node-parse-numeric-range.git"},"devDependencies":{"chai":"*","mocha":"*"},"bugs":{"url":"https://github.com/euank/node-parse-numeric-range/issues"},"_id":"parse-numeric-range@0.0.1","dist":{"shasum":"407a99950c8811be0d52b67957a1cdfbf74e856f","size":2579,"noattachment":false,"key":"/parse-numeric-range/-/parse-numeric-range-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-numeric-range/download/parse-numeric-range-0.0.1.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"euank","email":"euank@clemson.edu"},"maintainers":[{"name":"euank","email":"euank@clemson.edu"}],"directories":{},"publish_time":1403170670619,"_hasShrinkwrap":false,"_cnpm_publish_time":1403170670619,"_cnpmcore_publish_time":"2021-12-16T18:45:27.117Z"}},"readme":"node-parse-numeric-range\n========================\n\nParses expressions like 1-10,20-30. Returns an energetic (as opposed to lazy) array.\n\n\n## Supported Expressions\nComprehensive supported expression examples:\n\n| Expression | result       |\n|:----------:|:------------:|\n|            |   []         |\n|     1      |   [1]        |\n|    1,2     |  [1,2]       |\n|    -10     |  [-10]       |\n|   -3,-3    |[-3, -3]      |\n|  -1-2,-2   |[-1,0,1,2,-2] |\n|  -1--2     |[-1,-2]       |\n|  -1..2,-2  |[-1,0,1,2,-2] |\n|  -1...3,-2 |[-1,0,1,2,-2] |\n|   1⋯3      |[1,2]         |\n|  1…3       |[1,2]         |\n|  1‥3       |[1,2,3]       |\n\n\nWhat's this useful for? Well, letting users input these sorts of things and then\nmaking them programmatically useful.\n\n\n## Usage\n\nFirst, `npm install parse-numeric-range`.\n\n```javascript\nconst rangeParser = require(\"parse-numeric-range\");\n\nconst numbers = rangeParser(\"4,6,8-10,12,14..16,18,20...23\");\n\nconsole.log(\n  `The first ${numbers.length} composite numbers are: ${numbers.join(\", \")}`,\n);\n```\n\n### ES6\n```jsx\nimport rangeParser from \"parse-numeric-range\";\n\nconst numbers = rangeParser(\"4,6,8-10,12,14..16,18,20...23\");\n\nconsole.log(\n  `The first ${numbers.length} composite numbers are: ${numbers.join(\", \")}`,\n);\n```","_attachments":{},"homepage":"https://github.com/euank/node-parse-numeric-range","bugs":{"url":"https://github.com/euank/node-parse-numeric-range/issues"},"license":"ISC"}