Skip to content

Commit

Permalink
generate readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Apr 7, 2015
1 parent dafcb07 commit cbf91fc
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 39 deletions.
43 changes: 19 additions & 24 deletions .verb.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
{%= include("install-npm", {save: true}) %}

<!-- toc -->

## Usage

```js
Expand Down Expand Up @@ -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.

Expand All @@ -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.

Expand Down Expand Up @@ -172,8 +178,9 @@ range('10', '20', '~');
//=> ['(10-20)'
```

#### angle bracket

#### `>`
Character: _(`>`)_

Joins all values in the returned array to a single value.

Expand All @@ -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.

Expand Down Expand Up @@ -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") %}
Expand All @@ -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']) %}
53 changes: 38 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@
npm i fill-range --save
```

<!-- toc -->

- [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])_

<!-- tocstop -->

## Usage

```js
Expand Down Expand Up @@ -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.

Expand All @@ -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.

Expand Down Expand Up @@ -176,8 +200,9 @@ range('10', '20', '~');
//=> ['(10-20)'
```

#### angle bracket

#### `>`
Character: _(`>`)_

Joins all values in the returned array to a single value.

Expand All @@ -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.

Expand Down Expand Up @@ -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)

Expand All @@ -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

0 comments on commit cbf91fc

Please sign in to comment.