diff --git a/.verb.md b/.verb.md index c68c8d8..1cdc392 100644 --- a/.verb.md +++ b/.verb.md @@ -4,6 +4,8 @@ {%= include("install-npm", {save: true}) %} + + ## Usage ```js @@ -107,7 +109,9 @@ range('a', 'z', SPECIAL_CHARACTER_HERE); - `>`: join values to single array element - `?`: randomize the given pattern using [randomatic] -#### `+` +#### plus + +Character: _(`+`)_ Repeat the first argument the number of times passed on the second argument. @@ -121,7 +125,9 @@ range('abc', 2, '+'); //=> ['abc', 'abc'] ``` -#### `|` and `~` +#### pipe and tilde + +Characters: _(`|` and `~`)_ Creates a regex-capable string (either a logical `or` or a character class) from the expanded arguments. @@ -172,8 +178,9 @@ range('10', '20', '~'); //=> ['(10-20)' ``` +#### angle bracket -#### `>` +Character: _(`>`)_ Joins all values in the returned array to a single value. @@ -191,7 +198,9 @@ range('2', '20', '2>'); ``` -#### `?` +#### question mark + +Character: _(`?`)_ Uses [randomatic] to generate randomized alpha, numeric, or alpha-numeric patterns based on the provided arguments. @@ -222,24 +231,14 @@ range('A0', 10, '?'); See the [randomatic] repo for all available options and or to create issues or feature requests related to randomization. +## Other useful libs +{%= related(['micromatch', 'expand-range', 'braces', 'is-glob']) %} -## Run tests - -Install dev dependencies: - -```bash -npm i -d && npm test -``` - -## Related - -- [micromatch]: wildcard/glob matcher for javascript. a faster alternative to minimatch. -- [expand-range]: uses fill-range for range expansion in strings -- [braces]: uses expand range to do range expansion in glob patterns and braces. - +## Running tests +{%= include("tests") %} ## Contributing -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue]({%= bugs.url %}) +{%= include("contributing") %} ## Author {%= include("author") %} @@ -252,8 +251,4 @@ Pull requests and stars are always welcome. For bugs and feature requests, [plea {%= include("footer") %} -[randomatic]: https://github.com/jonschlinkert/randomatic - -[expand-range]: https://github.com/jonschlinkert/expand-range -[micromatch]: https://github.com/jonschlinkert/micromatch -[braces]: https://github.com/jonschlinkert/braces +{%= reflinks(['randomatic', 'expand-range', 'micromatch', 'braces']) %} diff --git a/README.md b/README.md index 6a60aa9..c69694a 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,26 @@ npm i fill-range --save ``` + + +- [Usage](#usage) + * [Invalid ranges](#invalid-ranges) + * [Custom function](#custom-function) + * [Special characters](#special-characters) + + [plus](#plus) + + [pipe and tilde](#pipe-and-tilde) + + [angle bracket](#angle-bracket) + + [question mark](#question-mark) +- [Other useful libs](#other-useful-libs) +- [Running tests](#running-tests) +- [Contributing](#contributing) +- [Author](#author) +- [License](#license) + +_(Table of contents generated by [verb])_ + + + ## Usage ```js @@ -111,7 +131,9 @@ range('a', 'z', SPECIAL_CHARACTER_HERE); - `>`: join values to single array element - `?`: randomize the given pattern using [randomatic] -#### `+` +#### plus + +Character: _(`+`)_ Repeat the first argument the number of times passed on the second argument. @@ -125,7 +147,9 @@ range('abc', 2, '+'); //=> ['abc', 'abc'] ``` -#### `|` and `~` +#### pipe and tilde + +Characters: _(`|` and `~`)_ Creates a regex-capable string (either a logical `or` or a character class) from the expanded arguments. @@ -176,8 +200,9 @@ range('10', '20', '~'); //=> ['(10-20)' ``` +#### angle bracket -#### `>` +Character: _(`>`)_ Joins all values in the returned array to a single value. @@ -195,7 +220,9 @@ range('2', '20', '2>'); ``` -#### `?` +#### question mark + +Character: _(`?`)_ Uses [randomatic] to generate randomized alpha, numeric, or alpha-numeric patterns based on the provided arguments. @@ -226,29 +253,26 @@ range('A0', 10, '?'); See the [randomatic] repo for all available options and or to create issues or feature requests related to randomization. +## Other useful libs + * [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just use `micromatch.isMatch()` instead of `minimatch()`, or use `micromatch()` instead of `multimatch()`. + * [expand-range](https://github.com/jonschlinkert/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See the benchmarks. Used by micromatch. + * [braces](https://github.com/jonschlinkert/braces): Fastest brace expansion for node.js, with the most complete support for the Bash 4.3 braces specification. + * [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern. -## Run tests - +## Running tests Install dev dependencies: ```bash npm i -d && npm test ``` -## Related - -- [micromatch]: wildcard/glob matcher for javascript. a faster alternative to minimatch. -- [expand-range]: uses fill-range for range expansion in strings -- [braces]: uses expand range to do range expansion in glob patterns and braces. - - ## Contributing Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/fill-range/issues) ## Author **Jon Schlinkert** - + + [github/jonschlinkert](https://github.com/jonschlinkert) + [twitter/jonschlinkert](http://twitter.com/jonschlinkert) @@ -261,7 +285,6 @@ Released under the MIT license _This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on April 07, 2015._ [randomatic]: https://github.com/jonschlinkert/randomatic - [expand-range]: https://github.com/jonschlinkert/expand-range [micromatch]: https://github.com/jonschlinkert/micromatch [braces]: https://github.com/jonschlinkert/braces \ No newline at end of file