range-parser2
v0.4.1
Published
Parse ranges and unions: '1-3,5-7,12' → [1, 2, 3, 5, 6, 7, 12]
Downloads
2
Readme
range-parser
Parse ranges and unions: '1-3,5-7,12' → [1, 2, 3, 5, 6, 7, 12]
Install
Download manually or with package-manager.
npm
npm install --save range-parser2
bower
bower install --save range-parser2
Example
var parseRange = require('range-parser2');
console.log(parseRange('5-12,15'));
//=> [5, 6, 7, 8, 9, 10, 11, 12, 15];
Name
The name range-parser was already taken so I went for range-parser2.
I am open to a better name ;)
Contributing
Contributions are very welcome, either on the documentation or on the code.
You may:
- report any issue you've encountered;
- fork and create a pull request.
License
ISC © Julien Fontanet