Skip to content

Commit d15f811

Browse files
committed
run verb to generate readme documentation
1 parent e601372 commit d15f811

File tree

2 files changed

+44
-74
lines changed

2 files changed

+44
-74
lines changed

.verb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ If you're interested in learning more about [character classes](http://www.regul
4848

4949
As of {%= date() %}, this library runs [2,783,483 test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are indeed correct.
5050

51-
Tests run in ~870ms on my MacBook Pro, 2.5 GHz Intel Core i7.
51+
Tests run in ~580ms on my MacBook Pro, 2.5 GHz Intel Core i7.
5252

5353
### Highly optimized
5454

README.md

Lines changed: 43 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ If you're interested in learning more about [character classes](http://www.regul
5959

6060
### Heavily tested
6161

62-
As of July 04, 2018, this library runs [2,783,483 test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are indeed correct.
62+
As of July 25, 2018, this library runs [2,783,483 test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are indeed correct.
6363

64-
Tests run in ~870ms on my MacBook Pro, 2.5 GHz Intel Core i7.
64+
Tests run in ~580ms on my MacBook Pro, 2.5 GHz Intel Core i7.
6565

6666
### Highly optimized
6767

@@ -167,46 +167,27 @@ Thus, we relax zeros by default to provide a more predictable experience for use
167167

168168
## Examples
169169

170-
| **Range** | **Result** | **Compile time** |
171-
| --- | --- | --- |
172-
| `toRegexRange('5, 5')` | `5` | _15μs_
173-
|
174-
| `toRegexRange('5, 6')` | `5\ | 6` | _21μs_
175-
|
176-
| `toRegexRange('29, 51')` | `29\ | [34](https://github.com//0-9)\ | 5[01]` | _314μs_
177-
|
178-
| `toRegexRange('31, 877')` | `3[1-9]\ | [4-9](https://github.com//0-9)\ | [1-7](https://github.com//0-92)\ | 8[0-6](https://github.com//0-9)\ | 87[0-7]` | _88μs_
179-
|
180-
| `toRegexRange('111, 555')` | `11[1-9]\ | 1[2-9](https://github.com//0-9)\ | [2-4](https://github.com//0-92)\ | 5[0-4](https://github.com//0-9)\ | 55[0-5]` | _72μs_
181-
|
182-
| `toRegexRange('-10, 10')` | `-[1-9]\ | -?10\ | [0-9](https://github.com//0-9)` | _67μs_
183-
|
184-
| `toRegexRange('-100, -10')` | `-1[0-9](https://github.com//0-9)\ | -[2-9](https://github.com//0-9)\ | -100` | _53μs_
185-
|
186-
| `toRegexRange('-100, 100')` | `-[1-9]\ | -?[1-9](https://github.com//0-9)\ | -?100\ | [0-9](https://github.com//0-9)` | _68μs_
187-
|
188-
| `toRegexRange('001, 100')` | `0{2}[1-9]\ | 0[1-9](https://github.com//0-9)\ | 100` | _121μs_
189-
|
190-
| `toRegexRange('0010, 1000')` | `0{2}1[0-9](https://github.com//0-9)\ | 0{2}[2-9](https://github.com//0-9)\ | 0[1-9](https://github.com//0-92)\ | 1000` | _73μs_
191-
|
192-
| `toRegexRange('1, 2')` | `1\ | 2` | _10μs_
193-
|
194-
| `toRegexRange('1, 5')` | `[1-5]` | _26μs_
195-
|
196-
| `toRegexRange('1, 10')` | `[1-9]\ | 10` | _33μs_
197-
|
198-
| `toRegexRange('1, 100')` | `[1-9]\ | [1-9](https://github.com//0-9)\ | 100` | _67μs_
199-
|
200-
| `toRegexRange('1, 1000')` | `[1-9]\ | [1-9](https://github.com//0-91,2)\ | 1000` | _50μs_
201-
|
202-
| `toRegexRange('1, 10000')` | `[1-9]\ | [1-9](https://github.com//0-91,3)\ | 10000` | _65μs_
203-
|
204-
| `toRegexRange('1, 100000')` | `[1-9]\ | [1-9](https://github.com//0-91,4)\ | 100000` | _69μs_
205-
|
206-
| `toRegexRange('1, 1000000')` | `[1-9]\ | [1-9](https://github.com//0-91,5)\ | 1000000` | _74μs_
207-
|
208-
| `toRegexRange('1, 10000000')` | `[1-9]\ | [1-9](https://github.com//0-91,6)\ | 10000000` | _86μs_
209-
|
170+
| **Range** | **Result** | **Compile time** |
171+
| --- | --- | --- |
172+
| `toRegexRange('5, 5')` | `5` | _20μs_ |
173+
| `toRegexRange('5, 6')` | `5\|6` | _30μs_ |
174+
| `toRegexRange('29, 51')` | `29\|[34][0-9]\|5[01]` | _341μs_ |
175+
| `toRegexRange('31, 877')` | `3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7]` | _52μs_ |
176+
| `toRegexRange('111, 555')` | `11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _37μs_ |
177+
| `toRegexRange('-10, 10')` | `-[1-9]\|-?10\|[0-9]` | _43μs_ |
178+
| `toRegexRange('-100, -10')` | `-1[0-9]\|-[2-9][0-9]\|-100` | _39μs_ |
179+
| `toRegexRange('-100, 100')` | `-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9]` | _54μs_ |
180+
| `toRegexRange('001, 100')` | `0{2}[1-9]\|0[1-9][0-9]\|100` | _110μs_ |
181+
| `toRegexRange('0010, 1000')` | `0{2}1[0-9]\|0{2}[2-9][0-9]\|0[1-9][0-9]{2}\|1000` | _53μs_ |
182+
| `toRegexRange('1, 2')` | `1\|2` | _16μs_ |
183+
| `toRegexRange('1, 5')` | `[1-5]` | _21μs_ |
184+
| `toRegexRange('1, 10')` | `[1-9]\|10` | _28μs_ |
185+
| `toRegexRange('1, 100')` | `[1-9]\|[1-9][0-9]\|100` | _50μs_ |
186+
| `toRegexRange('1, 1000')` | `[1-9]\|[1-9][0-9]{1,2}\|1000` | _68μs_ |
187+
| `toRegexRange('1, 10000')` | `[1-9]\|[1-9][0-9]{1,3}\|10000` | _69μs_ |
188+
| `toRegexRange('1, 100000')` | `[1-9]\|[1-9][0-9]{1,4}\|100000` | _54μs_ |
189+
| `toRegexRange('1, 1000000')` | `[1-9]\|[1-9][0-9]{1,5}\|1000000` | _48μs_ |
190+
| `toRegexRange('1, 10000000')` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _56μs_ |
210191

211192
## Heads up!
212193

@@ -249,26 +230,26 @@ Inspired by the python library [range-regex](https://github.com/dimka665/range-r
249230

250231
## About
251232

252-
<details>
253-
<summary><strong>Contributing</strong></summary>
254-
255-
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
233+
### Related projects
256234

257-
</details>
235+
* [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].")
236+
* [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`")
237+
* [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.")
238+
* [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.")
239+
* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.")
258240

259-
<details>
260-
<summary><strong>Running Tests</strong></summary>
241+
### Contributing
261242

262-
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:
243+
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
263244

264-
```sh
265-
$ npm install && npm test
266-
```
245+
### Contributors
267246

268-
</details>
247+
| **Commits** | **Contributor** |
248+
| --- | --- |
249+
| 61 | [jonschlinkert](https://github.com/jonschlinkert) |
250+
| 2 | [realityking](https://github.com/realityking) |
269251

270-
<details>
271-
<summary><strong>Building docs</strong></summary>
252+
### Building docs
272253

273254
_(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.)_
274255

@@ -278,24 +259,13 @@ To generate the readme, run the following command:
278259
$ npm install -g verbose/verb#dev verb-generate-readme && verb
279260
```
280261

281-
</details>
282-
283-
### Related projects
262+
### Running tests
284263

285-
You might also be interested in these projects:
286-
287-
* [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].")
288-
* [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`")
289-
* [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.")
290-
* [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.")
291-
* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.")
292-
293-
### Contributors
264+
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:
294265

295-
| **Commits** | **Contributor** |
296-
| --- | --- |
297-
| 56 | [jonschlinkert](https://github.com/jonschlinkert) |
298-
| 2 | [realityking](https://github.com/realityking) |
266+
```sh
267+
$ npm install && npm test
268+
```
299269

300270
### Author
301271

@@ -312,4 +282,4 @@ Released under the [MIT License](LICENSE).
312282

313283
***
314284

315-
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 04, 2018._
285+
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.7.0, on July 25, 2018._

0 commit comments

Comments
 (0)