a|f|k|p|u|z)' ``` **Automatic separator correction** To avoid this error: > `Range out of order in character class` Fill-range detects invalid sequences and uses the correct syntax. For example: **invalid** (regex) If you pass these: ```js range('a', 'z', '~5'); // which would result in this //=> ['[a-f-k-p-u-z]'] range('10', '20', '~'); // which would result in this //=> ['[10-20]'] ``` **valid** (regex) fill-range corrects them to this: ```js range('a', 'z', '~5'); //=> ['(a|f|k|p|u|z)' range('10', '20', '~'); //=> ['(10-20)' ``` #### angle bracket Character: _(`>`)_ Joins all values in the returned array to a single value. **Examples:** ```js range('a', 'e', '>'); //=> ['abcde'] range('5', '8', '>'); //=> ['5678'] range('2', '20', '2>'); //=> ['2468101214161820'] ``` #### question mark Character: _(`?`)_ Uses [randomatic] to generate randomized alpha, numeric, or alpha-numeric patterns based on the provided arguments. **Examples:** _(actual results would obviously be randomized)_ Generate a 5-character, uppercase, alphabetical string: ```js range('A', 5, '?'); //=> ['NSHAK'] ``` Generate a 5-digit random number: ```js range('0', 5, '?'); //=> ['36583'] ``` Generate a 10-character alpha-numeric string: ```js range('A0', 10, '?'); //=> ['5YJD60VQNN'] ``` See the [randomatic] repo for all available options and or to create issues or feature requests related to randomization. ## About
Contributing Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
Running Tests Running 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: ```sh $ npm install && npm test ```
Building docs _(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.)_ To generate the readme, run the following command: ```sh $ npm install -g verbose/verb#dev verb-generate-readme && verb ```
### Related projects You might also be interested in these projects: * [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.") * [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by [micromatch].") * [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") * [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.") ### Contributors | **Commits** | **Contributor** | | --- | --- | | 111 | [jonschlinkert](https://github.com/jonschlinkert) | | 2 | [paulmillr](https://github.com/paulmillr) | | 1 | [edorivai](https://github.com/edorivai) | | 1 | [realityking](https://github.com/realityking) | | 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | ### Author **Jon Schlinkert** * [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) * [GitHub Profile](https://github.com/jonschlinkert) * [Twitter Profile](https://twitter.com/jonschlinkert) ### License Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). Released under the [MIT License](LICENSE). *** _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 08, 2018._