Debian Codegraph @

workspaces/arborist/test/fixtures/registry-mocks/content/regex-cache.json

raw
1 {
2 "_id": "regex-cache",
3 "_rev": "16-d950bd39f16a9ef806df5124ed471edb",
4 "name": "regex-cache",
5 "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements.",
6 "dist-tags": {
7 "latest": "0.4.4"
8 },
9 "versions": {
10 "0.1.0": {
11 "name": "regex-cache",
12 "description": "Memoize the results of a call to the RegExp constructor. Whenever possible, avoiding repetitious runtime compilation of the same string and options can result in dramatic speed improvements.",
13 "version": "0.1.0",
14 "homepage": "https://github.com/jonschlinkert/regex-cache",
15 "author": {
16 "name": "Jon Schlinkert",
17 "url": "https://github.com/jonschlinkert"
18 },
19 "repository": {
20 "type": "git",
21 "url": "git://github.com/jonschlinkert/regex-cache.git"
22 },
23 "bugs": {
24 "url": "https://github.com/jonschlinkert/regex-cache/issues"
25 },
26 "license": {
27 "type": "MIT",
28 "url": "https://github.com/jonschlinkert/regex-cache/blob/master/LICENSE"
29 },
30 "files": [
31 "index.js"
32 ],
33 "main": "index.js",
34 "engines": {
35 "node": ">=0.10.0"
36 },
37 "scripts": {
38 "test": "mocha",
39 "benchmarks": "node benchmark"
40 },
41 "dependencies": {
42 "benchmarked": "^0.1.3",
43 "chalk": "^0.5.1",
44 "micromatch": "^1.2.2"
45 },
46 "devDependencies": {
47 "mentions-regex": "^1.0.1",
48 "mocha": "^2.1.0",
49 "should": "*"
50 },
51 "keywords": [],
52 "gitHead": "fb650dd8badcb3e55ad89042b6d48c45f4437aed",
53 "_id": "[email protected]",
54 "_shasum": "5562267f3e12903e5c464e70f06a38d27c2a8184",
55 "_from": ".",
56 "_npmVersion": "1.4.28",
57 "_npmUser": {
58 "name": "jonschlinkert",
59 "email": "[email protected]"
60 },
61 "maintainers": [
62 {
63 "name": "jonschlinkert",
64 "email": "[email protected]"
65 }
66 ],
67 "dist": {
68 "shasum": "5562267f3e12903e5c464e70f06a38d27c2a8184",
69 "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.1.0.tgz"
70 },
71 "directories": {}
72 },
73 "0.1.1": {
74 "name": "regex-cache",
75 "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in dramatic speed improvements.",
76 "version": "0.1.1",
77 "homepage": "https://github.com/jonschlinkert/regex-cache",
78 "author": {
79 "name": "Jon Schlinkert",
80 "url": "https://github.com/jonschlinkert"
81 },
82 "repository": {
83 "type": "git",
84 "url": "git://github.com/jonschlinkert/regex-cache.git"
85 },
86 "bugs": {
87 "url": "https://github.com/jonschlinkert/regex-cache/issues"
88 },
89 "license": {
90 "type": "MIT",
91 "url": "https://github.com/jonschlinkert/regex-cache/blob/master/LICENSE"
92 },
93 "files": [
94 "index.js"
95 ],
96 "main": "index.js",
97 "engines": {
98 "node": ">=0.10.0"
99 },
100 "scripts": {
101 "test": "mocha",
102 "benchmarks": "node benchmark"
103 },
104 "dependencies": {
105 "benchmarked": "^0.1.3",
106 "chalk": "^0.5.1",
107 "micromatch": "^1.2.2"
108 },
109 "devDependencies": {
110 "mentions-regex": "^1.0.1",
111 "mocha": "^2.1.0",
112 "should": "*"
113 },
114 "keywords": [],
115 "gitHead": "fb650dd8badcb3e55ad89042b6d48c45f4437aed",
116 "_id": "[email protected]",
117 "_shasum": "c770cf43cf31edf80656ed5139d2786ba876470d",
118 "_from": ".",
119 "_npmVersion": "1.4.28",
120 "_npmUser": {
121 "name": "jonschlinkert",
122 "email": "[email protected]"
123 },
124 "maintainers": [
125 {
126 "name": "jonschlinkert",
127 "email": "[email protected]"
128 }
129 ],
130 "dist": {
131 "shasum": "c770cf43cf31edf80656ed5139d2786ba876470d",
132 "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.1.1.tgz"
133 },
134 "directories": {}
135 },
136 "0.2.0": {
137 "name": "regex-cache",
138 "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in dramatic speed improvements.",
139 "version": "0.2.0",
140 "homepage": "https://github.com/jonschlinkert/regex-cache",
141 "author": {
142 "name": "Jon Schlinkert",
143 "url": "https://github.com/jonschlinkert"
144 },
145 "repository": {
146 "type": "git",
147 "url": "git://github.com/jonschlinkert/regex-cache.git"
148 },
149 "bugs": {
150 "url": "https://github.com/jonschlinkert/regex-cache/issues"
151 },
152 "license": {
153 "type": "MIT",
154 "url": "https://github.com/jonschlinkert/regex-cache/blob/master/LICENSE"
155 },
156 "files": [
157 "index.js"
158 ],
159 "main": "index.js",
160 "engines": {
161 "node": ">=0.10.0"
162 },
163 "scripts": {
164 "test": "mocha",
165 "benchmarks": "node benchmark"
166 },
167 "dependencies": {
168 "benchmarked": "^0.1.3",
169 "chalk": "^0.5.1",
170 "micromatch": "^1.2.2"
171 },
172 "devDependencies": {
173 "mentions-regex": "^1.0.1",
174 "mocha": "^2.1.0",
175 "should": "*"
176 },
177 "keywords": [],
178 "gitHead": "2fcb3ee060ca41acb8bd1496c3115f99a51ee0a4",
179 "_id": "[email protected]",
180 "_shasum": "3bed13fad0cf9bb9768d1c64694f592467bf4c16",
181 "_from": ".",
182 "_npmVersion": "1.4.28",
183 "_npmUser": {
184 "name": "jonschlinkert",
185 "email": "[email protected]"
186 },
187 "maintainers": [
188 {
189 "name": "jonschlinkert",
190 "email": "[email protected]"
191 }
192 ],
193 "dist": {
194 "shasum": "3bed13fad0cf9bb9768d1c64694f592467bf4c16",
195 "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.2.0.tgz"
196 },
197 "directories": {}
198 },
199 "0.2.1": {
200 "name": "regex-cache",
201 "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in dramatic speed improvements.",
202 "version": "0.2.1",
203 "homepage": "https://github.com/jonschlinkert/regex-cache",
204 "author": {
205 "name": "Jon Schlinkert",
206 "url": "https://github.com/jonschlinkert"
207 },
208 "repository": {
209 "type": "git",
210 "url": "git://github.com/jonschlinkert/regex-cache.git"
211 },
212 "bugs": {
213 "url": "https://github.com/jonschlinkert/regex-cache/issues"
214 },
215 "license": {
216 "type": "MIT",
217 "url": "https://github.com/jonschlinkert/regex-cache/blob/master/LICENSE"
218 },
219 "files": [
220 "index.js"
221 ],
222 "main": "index.js",
223 "engines": {
224 "node": ">=0.10.0"
225 },
226 "scripts": {
227 "test": "mocha",
228 "benchmarks": "node benchmark"
229 },
230 "dependencies": {
231 "benchmarked": "^0.1.3",
232 "chalk": "^0.5.1",
233 "micromatch": "^1.2.2"
234 },
235 "devDependencies": {
236 "mentions-regex": "^1.0.1",
237 "mocha": "^2.1.0",
238 "should": "*"
239 },
240 "keywords": [],
241 "gitHead": "32d89bc73bc8b293603e7c9701c8437e0204808d",
242 "_id": "[email protected]",
243 "_shasum": "035ae2117c2d9bb78d8154939edac6914afee9ad",
244 "_from": ".",
245 "_npmVersion": "2.5.1",
246 "_nodeVersion": "0.12.0",
247 "_npmUser": {
248 "name": "jonschlinkert",
249 "email": "[email protected]"
250 },
251 "maintainers": [
252 {
253 "name": "jonschlinkert",
254 "email": "[email protected]"
255 }
256 ],
257 "dist": {
258 "shasum": "035ae2117c2d9bb78d8154939edac6914afee9ad",
259 "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.2.1.tgz"
260 },
261 "directories": {}
262 },
263 "0.3.0": {
264 "name": "regex-cache",
265 "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in dramatic speed improvements.",
266 "version": "0.3.0",
267 "homepage": "https://github.com/jonschlinkert/regex-cache",
268 "author": {
269 "name": "Jon Schlinkert",
270 "url": "https://github.com/jonschlinkert"
271 },
272 "repository": {
273 "type": "git",
274 "url": "git://github.com/jonschlinkert/regex-cache.git"
275 },
276 "bugs": {
277 "url": "https://github.com/jonschlinkert/regex-cache/issues"
278 },
279 "license": {
280 "type": "MIT",
281 "url": "https://github.com/jonschlinkert/regex-cache/blob/master/LICENSE"
282 },
283 "files": [
284 "index.js"
285 ],
286 "main": "index.js",
287 "engines": {
288 "node": ">=0.10.0"
289 },
290 "scripts": {
291 "test": "mocha",
292 "benchmarks": "node benchmark"
293 },
294 "dependencies": {
295 "benchmarked": "^0.1.3",
296 "chalk": "^0.5.1",
297 "micromatch": "^1.2.2",
298 "to-key": "^1.0.0"
299 },
300 "devDependencies": {
301 "mocha": "^2.1.0",
302 "should": "*"
303 },
304 "keywords": [
305 "cache",
306 "expression",
307 "regex",
308 "regexp",
309 "regular",
310 "regular expression",
311 "store",
312 "to-regex"
313 ],
314 "gitHead": "2bd4995be9229e1d6d0acbcfebab2ea069b73d3d",
315 "_id": "[email protected]",
316 "_shasum": "3ea036627179102bfb1a2364ab2679a0f32964c0",
317 "_from": ".",
318 "_npmVersion": "2.5.1",
319 "_nodeVersion": "0.12.0",
320 "_npmUser": {
321 "name": "jonschlinkert",
322 "email": "[email protected]"
323 },
324 "maintainers": [
325 {
326 "name": "jonschlinkert",
327 "email": "[email protected]"
328 }
329 ],
330 "dist": {
331 "shasum": "3ea036627179102bfb1a2364ab2679a0f32964c0",
332 "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.3.0.tgz"
333 },
334 "directories": {}
335 },
336 "0.4.1": {
337 "name": "regex-cache",
338 "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in dramatic speed improvements.",
339 "version": "0.4.1",
340 "homepage": "https://github.com/jonschlinkert/regex-cache",
341 "author": {
342 "name": "Jon Schlinkert",
343 "url": "https://github.com/jonschlinkert"
344 },
345 "repository": {
346 "type": "git",
347 "url": "git://github.com/jonschlinkert/regex-cache.git"
348 },
349 "bugs": {
350 "url": "https://github.com/jonschlinkert/regex-cache/issues"
351 },
352 "license": {
353 "type": "MIT",
354 "url": "https://github.com/jonschlinkert/regex-cache/blob/master/LICENSE"
355 },
356 "files": [
357 "index.js"
358 ],
359 "main": "index.js",
360 "engines": {
361 "node": ">=0.10.0"
362 },
363 "scripts": {
364 "test": "mocha",
365 "benchmarks": "node benchmark"
366 },
367 "dependencies": {
368 "is-equal-shallow": "^0.1.1",
369 "is-primitive": "^2.0.0"
370 },
371 "devDependencies": {
372 "benchmarked": "^0.1.4",
373 "chalk": "^1.0.0",
374 "micromatch": "^2.1.0",
375 "mocha": "^2.1.0",
376 "should": "*"
377 },
378 "keywords": [
379 "cache",
380 "expression",
381 "regex",
382 "regexp",
383 "regular",
384 "regular expression",
385 "store",
386 "to-regex"
387 ],
388 "gitHead": "9478eec6d9322a96a6ceb3e5488cd8433295a95f",
389 "_id": "[email protected]",
390 "_shasum": "709c5cec5ae8ec312c5992a84b6ec966a3fe94a0",
391 "_from": ".",
392 "_npmVersion": "2.7.1",
393 "_nodeVersion": "1.6.2",
394 "_npmUser": {
395 "name": "jonschlinkert",
396 "email": "[email protected]"
397 },
398 "maintainers": [
399 {
400 "name": "jonschlinkert",
401 "email": "[email protected]"
402 }
403 ],
404 "dist": {
405 "shasum": "709c5cec5ae8ec312c5992a84b6ec966a3fe94a0",
406 "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.1.tgz"
407 },
408 "directories": {}
409 },
410 "0.4.2": {
411 "name": "regex-cache",
412 "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in dramatic speed improvements.",
413 "version": "0.4.2",
414 "homepage": "https://github.com/jonschlinkert/regex-cache",
415 "author": {
416 "name": "Jon Schlinkert",
417 "url": "https://github.com/jonschlinkert"
418 },
419 "repository": {
420 "type": "git",
421 "url": "git://github.com/jonschlinkert/regex-cache.git"
422 },
423 "bugs": {
424 "url": "https://github.com/jonschlinkert/regex-cache/issues"
425 },
426 "license": {
427 "type": "MIT",
428 "url": "https://github.com/jonschlinkert/regex-cache/blob/master/LICENSE"
429 },
430 "files": [
431 "index.js"
432 ],
433 "main": "index.js",
434 "engines": {
435 "node": ">=0.10.0"
436 },
437 "scripts": {
438 "test": "mocha",
439 "benchmarks": "node benchmark"
440 },
441 "dependencies": {
442 "is-equal-shallow": "^0.1.1",
443 "is-primitive": "^2.0.0"
444 },
445 "devDependencies": {
446 "benchmarked": "^0.1.4",
447 "chalk": "^1.0.0",
448 "micromatch": "^2.1.0",
449 "mocha": "^2.1.0",
450 "should": "*"
451 },
452 "keywords": [
453 "cache",
454 "expression",
455 "regex",
456 "regexp",
457 "regular",
458 "regular expression",
459 "store",
460 "to-regex"
461 ],
462 "gitHead": "9478eec6d9322a96a6ceb3e5488cd8433295a95f",
463 "_id": "[email protected]",
464 "_shasum": "6e4f89c266bc03c33fd129c062184687f4663487",
465 "_from": ".",
466 "_npmVersion": "2.7.1",
467 "_nodeVersion": "1.6.2",
468 "_npmUser": {
469 "name": "jonschlinkert",
470 "email": "[email protected]"
471 },
472 "maintainers": [
473 {
474 "name": "jonschlinkert",
475 "email": "[email protected]"
476 }
477 ],
478 "dist": {
479 "shasum": "6e4f89c266bc03c33fd129c062184687f4663487",
480 "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.2.tgz"
481 },
482 "directories": {}
483 },
484 "0.4.3": {
485 "name": "regex-cache",
486 "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in suprising performance improvements.",
487 "version": "0.4.3",
488 "homepage": "https://github.com/jonschlinkert/regex-cache",
489 "author": {
490 "name": "Jon Schlinkert",
491 "url": "https://github.com/jonschlinkert"
492 },
493 "repository": {
494 "type": "git",
495 "url": "git+https://github.com/jonschlinkert/regex-cache.git"
496 },
497 "bugs": {
498 "url": "https://github.com/jonschlinkert/regex-cache/issues"
499 },
500 "license": "MIT",
501 "files": [
502 "index.js"
503 ],
504 "main": "index.js",
505 "engines": {
506 "node": ">=0.10.0"
507 },
508 "scripts": {
509 "test": "mocha",
510 "benchmarks": "node benchmark"
511 },
512 "dependencies": {
513 "is-equal-shallow": "^0.1.3",
514 "is-primitive": "^2.0.0"
515 },
516 "devDependencies": {
517 "benchmarked": "^0.1.5",
518 "chalk": "^1.1.3",
519 "gulp-format-md": "^0.1.7",
520 "micromatch": "^2.3.7",
521 "should": "^8.3.0"
522 },
523 "keywords": [
524 "cache",
525 "expression",
526 "regex",
527 "regexp",
528 "regular",
529 "regular expression",
530 "store",
531 "to-regex"
532 ],
533 "verb": {
534 "run": true,
535 "toc": false,
536 "layout": "default",
537 "tasks": [
538 "readme"
539 ],
540 "plugins": [
541 "gulp-format-md"
542 ],
543 "reflinks": [
544 "verb"
545 ],
546 "lint": {
547 "reflinks": true
548 }
549 },
550 "gitHead": "06ce46bda29a19064a968bd5d2d5596440be05ca",
551 "_id": "[email protected]",
552 "_shasum": "9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145",
553 "_from": ".",
554 "_npmVersion": "3.6.0",
555 "_nodeVersion": "5.5.0",
556 "_npmUser": {
557 "name": "jonschlinkert",
558 "email": "[email protected]"
559 },
560 "maintainers": [
561 {
562 "name": "jonschlinkert",
563 "email": "[email protected]"
564 },
565 {
566 "name": "doowb",
567 "email": "[email protected]"
568 }
569 ],
570 "dist": {
571 "shasum": "9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145",
572 "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz"
573 },
574 "_npmOperationalInternal": {
575 "host": "packages-12-west.internal.npmjs.com",
576 "tmp": "tmp/regex-cache-0.4.3.tgz_1459536604904_0.22530420310795307"
577 },
578 "directories": {}
579 },
580 "0.4.4": {
581 "name": "regex-cache",
582 "description": "Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements.",
583 "version": "0.4.4",
584 "homepage": "https://github.com/jonschlinkert/regex-cache",
585 "author": {
586 "name": "Jon Schlinkert",
587 "url": "https://github.com/jonschlinkert"
588 },
589 "contributors": [
590 {
591 "name": "Jon Schlinkert",
592 "url": "http://twitter.com/jonschlinkert"
593 },
594 {
595 "name": "Martin Kolárik",
596 "url": "https://kolarik.sk"
597 }
598 ],
599 "repository": {
600 "type": "git",
601 "url": "git+https://github.com/jonschlinkert/regex-cache.git"
602 },
603 "bugs": {
604 "url": "https://github.com/jonschlinkert/regex-cache/issues"
605 },
606 "license": "MIT",
607 "files": [
608 "index.js"
609 ],
610 "main": "index.js",
611 "engines": {
612 "node": ">=0.10.0"
613 },
614 "scripts": {
615 "test": "mocha",
616 "benchmarks": "node benchmark"
617 },
618 "dependencies": {
619 "is-equal-shallow": "^0.1.3"
620 },
621 "devDependencies": {
622 "ansi-bold": "^0.1.1",
623 "benchmarked": "^0.1.5",
624 "gulp-format-md": "^0.1.7",
625 "micromatch": "^2.3.7",
626 "should": "^8.3.0"
627 },
628 "keywords": [
629 "cache",
630 "expression",
631 "regex",
632 "regexp",
633 "regular",
634 "regular expression",
635 "store",
636 "to-regex"
637 ],
638 "verb": {
639 "run": true,
640 "toc": false,
641 "layout": "default",
642 "tasks": [
643 "readme"
644 ],
645 "plugins": [
646 "gulp-format-md"
647 ],
648 "reflinks": [
649 "verb"
650 ],
651 "lint": {
652 "reflinks": true
653 }
654 },
655 "gitHead": "e5ced08e45d2cc2d286a9e7b5a574963f6577712",
656 "_id": "[email protected]",
657 "_npmVersion": "5.3.0",
658 "_nodeVersion": "8.4.0",
659 "_npmUser": {
660 "name": "doowb",
661 "email": "[email protected]"
662 },
663 "dist": {
664 "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
665 "shasum": "75bdc58a2a1496cec48a12835bc54c8d562336dd",
666 "tarball": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz"
667 },
668 "maintainers": [
669 {
670 "name": "jonschlinkert",
671 "email": "[email protected]"
672 },
673 {
674 "name": "doowb",
675 "email": "[email protected]"
676 }
677 ],
678 "_npmOperationalInternal": {
679 "host": "s3://npm-registry-packages",
680 "tmp": "tmp/regex-cache-0.4.4.tgz_1504279132002_0.2753396413754672"
681 },
682 "directories": {}
683 }
684 },
685 "readme": "# regex-cache [![NPM version](https://img.shields.io/npm/v/regex-cache.svg?style=flat)](https://www.npmjs.com/package/regex-cache) [![NPM monthly downloads](https://img.shields.io/npm/dm/regex-cache.svg?style=flat)](https://npmjs.org/package/regex-cache) [![NPM total downloads](https://img.shields.io/npm/dt/regex-cache.svg?style=flat)](https://npmjs.org/package/regex-cache) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/regex-cache.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/regex-cache) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/regex-cache.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/regex-cache)\n\n> Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save regex-cache\n```\n\n* Read [what this does](#what-this-does).\n* See [the benchmarks](#benchmarks)\n\n## Usage\n\nWrap a function like this:\n\n```js\nvar cache = require('regex-cache');\nvar someRegex = cache(require('some-regex-lib'));\n```\n\n**Caching a regex**\n\nIf you want to cache a regex after calling `new RegExp()`, or you're requiring a module that returns a regex, wrap it with a function first:\n\n```js\nvar cache = require('regex-cache');\n\nfunction yourRegex(str, opts) {\n // do stuff to str and opts\n return new RegExp(str, opts.flags);\n}\n\nvar regex = cache(yourRegex);\n```\n\n## Recommendations\n\n### Use this when...\n\n* **No options are passed** to the function that creates the regex. Regardless of how big or small the regex is, when zero options are passed, caching will be faster than not.\n* **A few options are passed**, and the values are primitives. The limited benchmarks I did show that caching is beneficial when up to 8 or 9 options are passed.\n\n### Do not use this when...\n\n* **The values of options are not primitives**. When non-primitives must be compared for equality, the time to compare the options is most likely as long or longer than the time to just create a new regex.\n\n### Example benchmarks\n\nPerformance results, with and without regex-cache:\n\n```bash\n# no args passed (defaults)\n with-cache x 8,699,231 ops/sec ±0.86% (93 runs sampled)\n without-cache x 2,777,551 ops/sec ±0.63% (95 runs sampled)\n\n# string and six options passed\n with-cache x 1,885,934 ops/sec ±0.80% (93 runs sampled)\n without-cache x 1,256,893 ops/sec ±0.65% (97 runs sampled)\n\n# string only\n with-cache x 7,723,256 ops/sec ±0.87% (92 runs sampled)\n without-cache x 2,303,060 ops/sec ±0.47% (99 runs sampled)\n\n# one option passed\n with-cache x 4,179,877 ops/sec ±0.53% (100 runs sampled)\n without-cache x 2,198,422 ops/sec ±0.47% (95 runs sampled)\n\n# two options passed\n with-cache x 3,256,222 ops/sec ±0.51% (99 runs sampled)\n without-cache x 2,121,401 ops/sec ±0.79% (97 runs sampled)\n\n# six options passed\n with-cache x 1,816,018 ops/sec ±1.08% (96 runs sampled)\n without-cache x 1,157,176 ops/sec ±0.53% (100 runs sampled)\n\n# \n# diminishing returns happen about here\n# \n\n# ten options passed\n with-cache x 1,210,598 ops/sec ±0.56% (92 runs sampled)\n without-cache x 1,665,588 ops/sec ±1.07% (100 runs sampled)\n\n# twelve options passed\n with-cache x 1,042,096 ops/sec ±0.68% (92 runs sampled)\n without-cache x 1,389,414 ops/sec ±0.68% (97 runs sampled)\n\n# twenty options passed\n with-cache x 661,125 ops/sec ±0.80% (93 runs sampled)\n without-cache x 1,208,757 ops/sec ±0.65% (97 runs sampled)\n\n# \n# when non-primitive values are compared\n# \n\n# single value on the options is an object\n with-cache x 1,398,313 ops/sec ±1.05% (95 runs sampled)\n without-cache x 2,228,281 ops/sec ±0.56% (99 runs sampled)\n```\n\n## Run benchmarks\n\nInstall dev dependencies:\n\n```bash\nnpm i -d && npm run benchmarks\n```\n\n## What this does\n\nIf you're using `new RegExp('foo')` instead of a regex literal, it's probably because you need to dyamically generate a regex based on user options or some other potentially changing factors.\n\nWhen your function creates a string based on user inputs and passes it to the `RegExp` constructor, regex-cache caches the results. The next time the function is called if the key of a cached regex matches the user input (or no input was given), the cached regex is returned, avoiding unnecessary runtime compilation.\n\nUsing the RegExp constructor offers a lot of flexibility, but the runtime compilation comes at a price - it's slow. Not specifically because of the call to the RegExp constructor, but **because you have to build up the string before `new RegExp()` is even called**.\n\n## About\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- | \n| 31 | [jonschlinkert](https://github.com/jonschlinkert) | \n| 1 | [MartinKolarik](https://github.com/MartinKolarik) | \n\n### Building docs\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### Running tests\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### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [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.6.0, on September 01, 2017._",
686 "maintainers": [
687 {
688 "email": "[email protected]",
689 "name": "doowb"
690 },
691 {
692 "email": "[email protected]",
693 "name": "jonschlinkert"
694 }
695 ],
696 "time": {
697 "modified": "2017-10-02T17:36:50.375Z",
698 "created": "2015-02-09T12:14:22.194Z",
699 "0.1.0": "2015-02-09T12:14:22.194Z",
700 "0.1.1": "2015-02-09T12:16:02.663Z",
701 "0.2.0": "2015-02-09T13:37:14.168Z",
702 "0.2.1": "2015-02-17T01:25:54.933Z",
703 "0.3.0": "2015-02-17T08:04:50.627Z",
704 "0.4.1": "2015-03-25T22:26:57.199Z",
705 "0.4.2": "2015-03-25T22:28:18.072Z",
706 "0.4.3": "2016-04-01T18:50:07.156Z",
707 "0.4.4": "2017-09-01T15:18:53.060Z"
708 },
709 "homepage": "https://github.com/jonschlinkert/regex-cache",
710 "keywords": [
711 "cache",
712 "expression",
713 "regex",
714 "regexp",
715 "regular",
716 "regular expression",
717 "store",
718 "to-regex"
719 ],
720 "repository": {
721 "type": "git",
722 "url": "git+https://github.com/jonschlinkert/regex-cache.git"
723 },
724 "author": {
725 "name": "Jon Schlinkert",
726 "url": "https://github.com/jonschlinkert"
727 },
728 "bugs": {
729 "url": "https://github.com/jonschlinkert/regex-cache/issues"
730 },
731 "license": "MIT",
732 "readmeFilename": "README.md",
733 "contributors": [
734 {
735 "name": "Jon Schlinkert",
736 "url": "http://twitter.com/jonschlinkert"
737 },
738 {
739 "name": "Martin Kolárik",
740 "url": "https://kolarik.sk"
741 }
742 ],
743 "_attachments": {}
744 }