{"name":"expand-range","description":"Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch.","version":"1.2.0","homepage":"https://github.com/jonschlinkert/expand-range","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/expand-range.git"},"bugs":{"url":"https://github.com/jonschlinkert/expand-range/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/expand-range/blob/master/LICENSE-MIT"},"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"fill-range":"^1.4.0"},"devDependencies":{"benchmarked":"^0.1.1","brace-expansion":"^1.1.0","glob":"^4.3.2","minimatch":"^2.0.1","mocha":"*","should":"^4.1.0"},"keywords":["alpha","alphabetical","bash","brace","expand","expansion","glob","match","matches","matching","number","numerical","range","ranges","sh"],"gitHead":"c78548a0ce619be27a593a036f172dee1acd5380","_id":"expand-range@1.2.0","_shasum":"c4276715db1a853ad4bb5f74cb9e0f10e4795b03","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"c4276715db1a853ad4bb5f74cb9e0f10e4795b03","tarball":"http://registry-npm.ywwl.com/expand-range/download/expand-range-1.2.0.tgz","integrity":"sha512-c3/Yrj/OtEsmeIi8eu8O5J61bf7w8NbYV8+xyRBA23s4rgiF9zs/KYNK6JPTnsZTzheeNs73dzXQn+NlfZFdLA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEOKYTctlEigNSVRSbEvdXjZvx6VdQAoNH7105+nidTxAiEAnhAHolaqGId5TqzDu8J3gWTJYPevz56c3CTi1KyKRgU="}],"size":2440,"noattachment":false,"key":"/expand-range/-/expand-range-1.2.0.tgz"},"directories":{},"readme":"# expand-range [![NPM version](https://img.shields.io/npm/v/expand-range.svg?style=flat)](https://www.npmjs.com/package/expand-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/expand-range.svg?style=flat)](https://npmjs.org/package/expand-range) [![NPM total downloads](https://img.shields.io/npm/dt/expand-range.svg?style=flat)](https://npmjs.org/package/expand-range) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/expand-range.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/expand-range)\n\n> Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by micromatch.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save expand-range\n```\n\n## Example usage\n\n```js\nvar expand = require('expand-range');\nexpand('start..end..step', options);\n\n// examples\nconsole.log(expand('1..3')) //=> ['1', '2', '3']\nconsole.log(expand('1..10..3')) //=> [ '1', '4', '7', '10' ]\n```\n\n**Params**\n\n* `start`: the number or letter to start with\n* `end`: the number or letter to end with\n* `step`: (optional) the step/increment to use. works with letters and numbers.\n* `options`: Options object to pass to [fill-range](https://github.com/jonschlinkert/fill-range), or a transform function (see [fill-range](https://github.com/jonschlinkert/fill-range) readme for details and documentation)\n\nThis library wraps [fill-range](https://github.com/jonschlinkert/fill-range) to support range expansion using `..` separated strings. See [fill-range](https://github.com/jonschlinkert/fill-range) for the full list of options and features.\n\n**Examples**\n\n```js\nexpand('a..e')\n//=> ['a', 'b', 'c', 'd', 'e']\n\nexpand('a..e..2')\n//=> ['a', 'c', 'e']\n\nexpand('A..E..2')\n//=> ['A', 'C', 'E']\n\nexpand('1..3')\n//=> ['1', '2', '3']\n\nexpand('0..-5')\n//=> [ '0', '-1', '-2', '-3', '-4', '-5' ]\n\nexpand('-9..9..3')\n//=> [ '-9', '-6', '-3', '0', '3', '6', '9' ])\n\nexpand('-1..-10..-2')\n//=> [ '-1', '-3', '-5', '-7', '-9' ]\n\nexpand('1..10..2')\n//=> [ '1', '3', '5', '7', '9' ]\n```\n\n### Custom function\n\nOptionally pass a custom function as the second argument:\n\n```js\nexpand('a..e', function (val, isNumber, pad, i) {\n  if (!isNumber) {\n    return String.fromCharCode(val) + i;\n  }\n  return val;\n});\n//=> ['a0', 'b1', 'c2', 'd3', 'e4']\n```\n\n## Benchmarks\n\n```sh\n[object Object]\n```\n\n## History\n\n### v2.0.0\n\n**Changes**\n\n* Special `step` characters are no longer supported, as the same thing can be accomplished with a custom transform function.\n* The signature in the [transform function](https://github.com/jonschlinkert/fill-range#optionstransform) has changed. See [fill-range](https://github.com/jonschlinkert/fill-range) for more details.\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [braces](https://www.npmjs.com/package/braces): Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support… [more](https://github.com/micromatch/braces) | [homepage](https://github.com/micromatch/braces \"Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.\")\n* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range \"Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`\")\n* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch \"Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.\")\n\n### Contributors\n\n| **Commits** | **Contributor** |  \n| --- | --- |  \n| 65 | [jonschlinkert](https://github.com/jonschlinkert) |  \n| 1  | [dcohenb](https://github.com/dcohenb) |  \n| 1  | [stevelacy](https://github.com/stevelacy) |  \n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on November 26, 2018._","publish_time":1421273231527,"_cnpm_publish_time":1421273231527,"dist-tags":{"latest":"2.0.2"}}