Debian Codegraph @

workspaces/arborist/test/fixtures/registry-mocks/content/mem.json

raw
1 {
2 "_id": "mem",
3 "_rev": "42-b05027cebcbf7d078309a69c3e498a01",
4 "name": "mem",
5 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
6 "dist-tags": {
7 "latest": "8.0.0",
8 "next": "7.0.0-3"
9 },
10 "versions": {
11 "0.1.0": {
12 "name": "mem",
13 "version": "0.1.0",
14 "description": "Memoize functions - an optimization technique used to speed up consecutive function calls by caching the result of calls with identical inputs",
15 "license": "MIT",
16 "repository": {
17 "type": "git",
18 "url": "https://github.com/sindresorhus/mem"
19 },
20 "author": {
21 "name": "Sindre Sorhus",
22 "email": "[email protected]",
23 "url": "sindresorhus.com"
24 },
25 "engines": {
26 "node": ">=0.10.0"
27 },
28 "scripts": {
29 "test": "xo && ava"
30 },
31 "files": [
32 "index.js"
33 ],
34 "keywords": [
35 "memoize",
36 "function",
37 "mem",
38 "memoization",
39 "cache",
40 "caching",
41 "optimize",
42 "performance",
43 "ttl",
44 "expire",
45 "promise"
46 ],
47 "devDependencies": {
48 "ava": "*",
49 "delay": "^1.1.0",
50 "xo": "*"
51 },
52 "gitHead": "863a48adf8f83437383cdb3422a7c5d84f01654a",
53 "bugs": {
54 "url": "https://github.com/sindresorhus/mem/issues"
55 },
56 "homepage": "https://github.com/sindresorhus/mem",
57 "_id": "[email protected]",
58 "_shasum": "8aeb2b7a43e44d74c5cbbf5397e22255c747a5c2",
59 "_from": ".",
60 "_npmVersion": "2.14.7",
61 "_nodeVersion": "4.2.1",
62 "_npmUser": {
63 "name": "sindresorhus",
64 "email": "[email protected]"
65 },
66 "dist": {
67 "shasum": "8aeb2b7a43e44d74c5cbbf5397e22255c747a5c2",
68 "tarball": "https://registry.npmjs.org/mem/-/mem-0.1.0.tgz"
69 },
70 "maintainers": [
71 {
72 "name": "sindresorhus",
73 "email": "[email protected]"
74 }
75 ],
76 "directories": {}
77 },
78 "0.1.1": {
79 "name": "mem",
80 "version": "0.1.1",
81 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
82 "license": "MIT",
83 "repository": {
84 "type": "git",
85 "url": "git+https://github.com/sindresorhus/mem.git"
86 },
87 "author": {
88 "name": "Sindre Sorhus",
89 "email": "[email protected]",
90 "url": "sindresorhus.com"
91 },
92 "engines": {
93 "node": ">=0.10.0"
94 },
95 "scripts": {
96 "test": "xo && ava"
97 },
98 "files": [
99 "index.js"
100 ],
101 "keywords": [
102 "memoize",
103 "function",
104 "mem",
105 "memoization",
106 "cache",
107 "caching",
108 "optimize",
109 "performance",
110 "ttl",
111 "expire",
112 "promise"
113 ],
114 "devDependencies": {
115 "ava": "*",
116 "delay": "^1.1.0",
117 "xo": "*"
118 },
119 "gitHead": "65d4ab7fb3b43b71b3c968eff65329c8ebb3eee8",
120 "bugs": {
121 "url": "https://github.com/sindresorhus/mem/issues"
122 },
123 "homepage": "https://github.com/sindresorhus/mem#readme",
124 "_id": "[email protected]",
125 "_shasum": "24df988c3102b03c074c1b296239c5b2e6647825",
126 "_from": ".",
127 "_npmVersion": "3.7.0",
128 "_nodeVersion": "4.2.4",
129 "_npmUser": {
130 "name": "sindresorhus",
131 "email": "[email protected]"
132 },
133 "dist": {
134 "shasum": "24df988c3102b03c074c1b296239c5b2e6647825",
135 "tarball": "https://registry.npmjs.org/mem/-/mem-0.1.1.tgz"
136 },
137 "maintainers": [
138 {
139 "name": "sindresorhus",
140 "email": "[email protected]"
141 }
142 ],
143 "_npmOperationalInternal": {
144 "host": "packages-9-west.internal.npmjs.com",
145 "tmp": "tmp/mem-0.1.1.tgz_1454428396859_0.8970216677989811"
146 },
147 "directories": {}
148 },
149 "1.0.0": {
150 "name": "mem",
151 "version": "1.0.0",
152 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
153 "license": "MIT",
154 "repository": {
155 "type": "git",
156 "url": "git+https://github.com/sindresorhus/mem.git"
157 },
158 "author": {
159 "name": "Sindre Sorhus",
160 "email": "[email protected]",
161 "url": "sindresorhus.com"
162 },
163 "engines": {
164 "node": ">=4"
165 },
166 "scripts": {
167 "test": "xo && ava"
168 },
169 "files": [
170 "index.js"
171 ],
172 "keywords": [
173 "memoize",
174 "function",
175 "mem",
176 "memoization",
177 "cache",
178 "caching",
179 "optimize",
180 "performance",
181 "ttl",
182 "expire",
183 "promise"
184 ],
185 "dependencies": {
186 "mimic-fn": "^1.0.0"
187 },
188 "devDependencies": {
189 "ava": "*",
190 "delay": "^1.1.0",
191 "xo": "*"
192 },
193 "xo": {
194 "esnext": true
195 },
196 "gitHead": "2d45828833f4ab36d60d87a4b5b8032c822b2f22",
197 "bugs": {
198 "url": "https://github.com/sindresorhus/mem/issues"
199 },
200 "homepage": "https://github.com/sindresorhus/mem#readme",
201 "_id": "[email protected]",
202 "_shasum": "cb8ca87e412dd14b68c8439069c6ee0f51ee99db",
203 "_from": ".",
204 "_npmVersion": "2.15.9",
205 "_nodeVersion": "4.6.0",
206 "_npmUser": {
207 "name": "sindresorhus",
208 "email": "[email protected]"
209 },
210 "dist": {
211 "shasum": "cb8ca87e412dd14b68c8439069c6ee0f51ee99db",
212 "tarball": "https://registry.npmjs.org/mem/-/mem-1.0.0.tgz"
213 },
214 "maintainers": [
215 {
216 "name": "sindresorhus",
217 "email": "[email protected]"
218 }
219 ],
220 "_npmOperationalInternal": {
221 "host": "packages-12-west.internal.npmjs.com",
222 "tmp": "tmp/mem-1.0.0.tgz_1476898471266_0.8245243555866182"
223 },
224 "directories": {}
225 },
226 "1.1.0": {
227 "name": "mem",
228 "version": "1.1.0",
229 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
230 "license": "MIT",
231 "repository": {
232 "type": "git",
233 "url": "git+https://github.com/sindresorhus/mem.git"
234 },
235 "author": {
236 "name": "Sindre Sorhus",
237 "email": "[email protected]",
238 "url": "sindresorhus.com"
239 },
240 "engines": {
241 "node": ">=4"
242 },
243 "scripts": {
244 "test": "xo && ava"
245 },
246 "files": [
247 "index.js"
248 ],
249 "keywords": [
250 "memoize",
251 "function",
252 "mem",
253 "memoization",
254 "cache",
255 "caching",
256 "optimize",
257 "performance",
258 "ttl",
259 "expire",
260 "promise"
261 ],
262 "dependencies": {
263 "mimic-fn": "^1.0.0"
264 },
265 "devDependencies": {
266 "ava": "*",
267 "delay": "^1.1.0",
268 "xo": "*"
269 },
270 "xo": {
271 "esnext": true
272 },
273 "gitHead": "c12270441fab7f42fe53cf97edd53c60c4a8268f",
274 "bugs": {
275 "url": "https://github.com/sindresorhus/mem/issues"
276 },
277 "homepage": "https://github.com/sindresorhus/mem#readme",
278 "_id": "[email protected]",
279 "_shasum": "5edd52b485ca1d900fe64895505399a0dfa45f76",
280 "_from": ".",
281 "_npmVersion": "2.15.9",
282 "_nodeVersion": "4.6.0",
283 "_npmUser": {
284 "name": "sindresorhus",
285 "email": "[email protected]"
286 },
287 "dist": {
288 "shasum": "5edd52b485ca1d900fe64895505399a0dfa45f76",
289 "tarball": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz"
290 },
291 "maintainers": [
292 {
293 "name": "sindresorhus",
294 "email": "[email protected]"
295 }
296 ],
297 "_npmOperationalInternal": {
298 "host": "packages-12-west.internal.npmjs.com",
299 "tmp": "tmp/mem-1.1.0.tgz_1476900325889_0.8028518599458039"
300 },
301 "directories": {}
302 },
303 "2.0.0": {
304 "name": "mem",
305 "version": "2.0.0",
306 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
307 "license": "MIT",
308 "repository": {
309 "type": "git",
310 "url": "git+https://github.com/sindresorhus/mem.git"
311 },
312 "author": {
313 "name": "Sindre Sorhus",
314 "email": "[email protected]",
315 "url": "sindresorhus.com"
316 },
317 "engines": {
318 "node": ">=4"
319 },
320 "scripts": {
321 "test": "xo && ava"
322 },
323 "files": [
324 "index.js"
325 ],
326 "keywords": [
327 "memoize",
328 "function",
329 "mem",
330 "memoization",
331 "cache",
332 "caching",
333 "optimize",
334 "performance",
335 "ttl",
336 "expire",
337 "promise"
338 ],
339 "dependencies": {
340 "mimic-fn": "^1.0.0",
341 "p-is-promise": "^1.1.0"
342 },
343 "devDependencies": {
344 "ava": "*",
345 "delay": "^2.0.0",
346 "xo": "*"
347 },
348 "gitHead": "009ce6a634d1f0d0a6cb0c93d1f59a17b8d6b2ed",
349 "bugs": {
350 "url": "https://github.com/sindresorhus/mem/issues"
351 },
352 "homepage": "https://github.com/sindresorhus/mem#readme",
353 "_id": "[email protected]",
354 "_npmVersion": "5.3.0",
355 "_nodeVersion": "8.5.0",
356 "_npmUser": {
357 "name": "sindresorhus",
358 "email": "[email protected]"
359 },
360 "dist": {
361 "integrity": "sha512-pbTjCfxCF9hnnypsdhIt6UWLYOfyigFGxyoy2iE+mj/VVde/HUUlbCwj/Ww6bIoFwjnFvyFQpiAUUWjH5mfLFw==",
362 "shasum": "37b692533f101bec274c81a76c7bf4cd57fda89f",
363 "tarball": "https://registry.npmjs.org/mem/-/mem-2.0.0.tgz"
364 },
365 "maintainers": [
366 {
367 "name": "sindresorhus",
368 "email": "[email protected]"
369 }
370 ],
371 "_npmOperationalInternal": {
372 "host": "s3://npm-registry-packages",
373 "tmp": "tmp/mem-2.0.0.tgz_1506321128100_0.6689927573315799"
374 },
375 "directories": {}
376 },
377 "3.0.0": {
378 "name": "mem",
379 "version": "3.0.0",
380 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
381 "license": "MIT",
382 "repository": {
383 "type": "git",
384 "url": "git+https://github.com/sindresorhus/mem.git"
385 },
386 "author": {
387 "name": "Sindre Sorhus",
388 "email": "[email protected]",
389 "url": "sindresorhus.com"
390 },
391 "engines": {
392 "node": ">=4"
393 },
394 "scripts": {
395 "test": "xo && ava"
396 },
397 "files": [
398 "index.js"
399 ],
400 "keywords": [
401 "memoize",
402 "function",
403 "mem",
404 "memoization",
405 "cache",
406 "caching",
407 "optimize",
408 "performance",
409 "ttl",
410 "expire",
411 "promise"
412 ],
413 "dependencies": {
414 "mimic-fn": "^1.0.0",
415 "p-is-promise": "^1.1.0"
416 },
417 "devDependencies": {
418 "ava": "*",
419 "delay": "^2.0.0",
420 "xo": "*"
421 },
422 "gitHead": "74439cc052c3bec1ec18b312f8913011dc262ed7",
423 "bugs": {
424 "url": "https://github.com/sindresorhus/mem/issues"
425 },
426 "homepage": "https://github.com/sindresorhus/mem#readme",
427 "_id": "[email protected]",
428 "_shasum": "84e58ad4dfbdf5d105b26b6548a398b2b3aa8a21",
429 "_from": ".",
430 "_npmVersion": "2.15.11",
431 "_nodeVersion": "4.8.3",
432 "_npmUser": {
433 "name": "sindresorhus",
434 "email": "[email protected]"
435 },
436 "dist": {
437 "shasum": "84e58ad4dfbdf5d105b26b6548a398b2b3aa8a21",
438 "tarball": "https://registry.npmjs.org/mem/-/mem-3.0.0.tgz"
439 },
440 "maintainers": [
441 {
442 "name": "sindresorhus",
443 "email": "[email protected]"
444 }
445 ],
446 "_npmOperationalInternal": {
447 "host": "s3://npm-registry-packages",
448 "tmp": "tmp/mem-3.0.0.tgz_1507737373888_0.41107727540656924"
449 },
450 "directories": {}
451 },
452 "3.0.1": {
453 "name": "mem",
454 "version": "3.0.1",
455 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
456 "license": "MIT",
457 "repository": {
458 "type": "git",
459 "url": "git+https://github.com/sindresorhus/mem.git"
460 },
461 "author": {
462 "name": "Sindre Sorhus",
463 "email": "[email protected]",
464 "url": "sindresorhus.com"
465 },
466 "engines": {
467 "node": ">=4"
468 },
469 "scripts": {
470 "test": "xo && ava"
471 },
472 "files": [
473 "index.js"
474 ],
475 "keywords": [
476 "memoize",
477 "function",
478 "mem",
479 "memoization",
480 "cache",
481 "caching",
482 "optimize",
483 "performance",
484 "ttl",
485 "expire",
486 "promise"
487 ],
488 "dependencies": {
489 "mimic-fn": "^1.0.0",
490 "p-is-promise": "^1.1.0"
491 },
492 "devDependencies": {
493 "ava": "*",
494 "delay": "^2.0.0",
495 "xo": "*"
496 },
497 "gitHead": "16ff264ad0b1b7a2bfb8b8003dab2dc27c4d89d1",
498 "bugs": {
499 "url": "https://github.com/sindresorhus/mem/issues"
500 },
501 "homepage": "https://github.com/sindresorhus/mem#readme",
502 "_id": "[email protected]",
503 "_npmVersion": "5.6.0",
504 "_nodeVersion": "8.11.2",
505 "_npmUser": {
506 "name": "sindresorhus",
507 "email": "[email protected]"
508 },
509 "dist": {
510 "integrity": "sha512-QKs47bslvOE0NbXOqG6lMxn6Bk0Iuw0vfrIeLykmQle2LkCw1p48dZDdzE+D88b/xqRJcZGcMNeDvSVma+NuIQ==",
511 "shasum": "152410d0d7e835e4a4363e626238d9e5be3d6f5a",
512 "tarball": "https://registry.npmjs.org/mem/-/mem-3.0.1.tgz",
513 "fileCount": 4,
514 "unpackedSize": 6622,
515 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKfZLCRA9TVsSAnZWagAA3UMP/19078JzW0g3A7kvikvK\nimhC+gJF3/+nRe/VFJ6uArsgrIpfSXLG/Qrth82B6UuHZXbGLgUAuwyFmtri\nQZ7pbE5gtAYAp30FxRjGf1sO0nbhNw4gZ34wbQ9rGIFFQOGoyun0FCW6KH+r\nOTT224SD78XjgEo2PXmb9lUI0VaSvoFqwqd+dHdaTkY6EelJqjVnpWK0QWiN\nFl88ojjbVGuh5viGkKsXNLlTzs9Fu0cB9OyZ+KkhRHfbXL7UzwDn611/EfdP\nnQBTyyie3B633IGotn8vOqZHmTFsL9mnvNMmEs9wmz6wzvN5uea3gof7l6Xf\nB2T3QgyvX1t+GbB5o8zwbXEHO65DZqIGvEeXrBgPSeqas/2Qcjz0f81MMYSI\nF6ADTlm6ixfhmHYgwpATPUjDqkQ36Mf+VrlhQVhpl4cA+XTNm7NpDmhr/A/C\nCXVYV5ctIExI20Wf/6bDCESlYsxDguqKoHUwnnXWn/oOwg4sYcbWFr8rLNHX\nZR5xl+PXcMJck8TkO+5cSsGU2r/Y6bAKQd9epD4tGI3JX4vz7k5AS4cazdIU\neuSkNLV+hCRXkw7YQzHH/OxhMOoMCfxGjmffzXqYdQI22ZAtAd0KvmemuvQu\ncPABZGCT/SFgcFKFbfeSi2yr3nN5MHnM3h4AhxG0MOYhPfpX62e3mM6durDQ\nWiMm\r\n=0ozy\r\n-----END PGP SIGNATURE-----\r\n"
516 },
517 "maintainers": [
518 {
519 "name": "sindresorhus",
520 "email": "[email protected]"
521 }
522 ],
523 "directories": {},
524 "_npmOperationalInternal": {
525 "host": "s3://npm-registry-packages",
526 "tmp": "tmp/mem_3.0.1_1529476682375_0.6427172635818768"
527 },
528 "_hasShrinkwrap": false
529 },
530 "4.0.0": {
531 "name": "mem",
532 "version": "4.0.0",
533 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
534 "license": "MIT",
535 "repository": {
536 "type": "git",
537 "url": "git+https://github.com/sindresorhus/mem.git"
538 },
539 "author": {
540 "name": "Sindre Sorhus",
541 "email": "[email protected]",
542 "url": "sindresorhus.com"
543 },
544 "engines": {
545 "node": ">=6"
546 },
547 "scripts": {
548 "test": "xo && ava"
549 },
550 "files": [
551 "index.js"
552 ],
553 "keywords": [
554 "memoize",
555 "function",
556 "mem",
557 "memoization",
558 "cache",
559 "caching",
560 "optimize",
561 "performance",
562 "ttl",
563 "expire",
564 "promise"
565 ],
566 "dependencies": {
567 "map-age-cleaner": "^0.1.1",
568 "mimic-fn": "^1.0.0",
569 "p-is-promise": "^1.1.0"
570 },
571 "devDependencies": {
572 "ava": "*",
573 "delay": "^3.0.0",
574 "xo": "*"
575 },
576 "gitHead": "159369f78b3dc80b72c999e11ba1b350376cc3e4",
577 "bugs": {
578 "url": "https://github.com/sindresorhus/mem/issues"
579 },
580 "homepage": "https://github.com/sindresorhus/mem#readme",
581 "_id": "[email protected]",
582 "_npmVersion": "5.6.0",
583 "_nodeVersion": "8.11.4",
584 "_npmUser": {
585 "name": "sindresorhus",
586 "email": "[email protected]"
587 },
588 "dist": {
589 "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==",
590 "shasum": "6437690d9471678f6cc83659c00cbafcd6b0cdaf",
591 "tarball": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz",
592 "fileCount": 4,
593 "unpackedSize": 6886,
594 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhDXzCRA9TVsSAnZWagAAuogP/0BeGsvg/qP/EEHQAJxP\nPiIfi0gi6nP5qtX0dDqjKJALBYsFoRXJx9gFGr3MiyzQTGHulnSUBopmN/Um\nXBTeTw3jm97scLC71ozFIZRAUC9QFUs0j6RtRYNPghT6NgstB0sZZjMNASp5\nAepb4bOCNhb/j81EkMfNrGtFeOvq2/fzxnkwEbK581hWewCzLcH4E4our4Aq\nVfMvV/wTss9BNhAgM5GbhNOhr9ys1h2dThmjTkATlZE+lkULCAYYydA1spXM\nONTW+RjoCLjwjZ4xlSiPpy9y0AWhSSldXAqd7JByVHuRLCfw5mbBYJ96tgpy\nAP+nU41+SeiQRTV327Jjqie//D7s40CYqIlDXntUPsVNmO87qwNYxQ0HyYKP\n0+SN1Rhv4YhIUn0xtwHASUZR/O4q7cWD3VabeTA3wMGP2kbqV7XXVs9haqjj\n58XhT7euHZMetI6aUlkOPVP1gEG4yRy5E1HbtDfEC9fntIeH6WzyAvq6zrGT\nl4A/xBqT1wVdmbulnIx/32NnFNbZlmcse3dZv9R2vYp4Rn1fg0mXh7W4HRyu\nlS41J2yGxLdcUSfSFe//9kJn4kI9yQ7hBp00BVUTcXmZub2gUj45AazrVvRc\nKzs/a9Vxvu5JcDHTKO5H8LnNSclq3IEWLQXd8l4LvtzH7B7rtBdQUYJH2wn9\nxi+s\r\n=Fhi4\r\n-----END PGP SIGNATURE-----\r\n"
595 },
596 "maintainers": [
597 {
598 "name": "sindresorhus",
599 "email": "[email protected]"
600 }
601 ],
602 "directories": {},
603 "_npmOperationalInternal": {
604 "host": "s3://npm-registry-packages",
605 "tmp": "tmp/mem_4.0.0_1535391218283_0.18788295308356084"
606 },
607 "_hasShrinkwrap": false
608 },
609 "4.1.0": {
610 "name": "mem",
611 "version": "4.1.0",
612 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
613 "license": "MIT",
614 "repository": {
615 "type": "git",
616 "url": "git+https://github.com/sindresorhus/mem.git"
617 },
618 "author": {
619 "name": "Sindre Sorhus",
620 "email": "[email protected]",
621 "url": "sindresorhus.com"
622 },
623 "engines": {
624 "node": ">=6"
625 },
626 "scripts": {
627 "test": "xo && ava"
628 },
629 "keywords": [
630 "memoize",
631 "function",
632 "mem",
633 "memoization",
634 "cache",
635 "caching",
636 "optimize",
637 "performance",
638 "ttl",
639 "expire",
640 "promise"
641 ],
642 "dependencies": {
643 "map-age-cleaner": "^0.1.1",
644 "mimic-fn": "^1.0.0",
645 "p-is-promise": "^2.0.0"
646 },
647 "devDependencies": {
648 "ava": "^1.0.1",
649 "delay": "^4.1.0",
650 "xo": "^0.23.0"
651 },
652 "gitHead": "a583160e36a088d565a82d11dfea3e78755cca18",
653 "bugs": {
654 "url": "https://github.com/sindresorhus/mem/issues"
655 },
656 "homepage": "https://github.com/sindresorhus/mem#readme",
657 "_id": "[email protected]",
658 "_npmVersion": "6.4.1",
659 "_nodeVersion": "10.15.0",
660 "_npmUser": {
661 "name": "sindresorhus",
662 "email": "[email protected]"
663 },
664 "dist": {
665 "integrity": "sha512-I5u6Q1x7wxO0kdOpYBB28xueHADYps5uty/zg936CiG8NTe5sJL8EjrCuLneuDW3PlMdZBGDIn8BirEVdovZvg==",
666 "shasum": "aeb9be2d21f47e78af29e4ac5978e8afa2ca5b8a",
667 "tarball": "https://registry.npmjs.org/mem/-/mem-4.1.0.tgz",
668 "fileCount": 4,
669 "unpackedSize": 7038,
670 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUWQoCRA9TVsSAnZWagAA43sP/08xJjQxRmTXifguY+6t\nZ2aXdFgHJwTgNQ1B+iJoFGpmZqFLnn+5qEFCYJYRPMCowRtcvXFpn15tFc3k\nDrf3nulFUVNXJvWkqA4So8x15da/V2YMs999VLs50SyHmEJUReNWxENRLMij\nRSJlg6bufzS+lC+WPCBIpDi1KLSMJYc2NOgj1O9MVmKLL6GIXgfCnLNS0wFp\nXDeXWjFqJvv2I4rhaHevH+T7cpGZveZiVbYLDzUvnoPe9fmiKrDQCrz7Bvml\n0vHCILgXPcb353Jhvs2YPYununVpycoYDNIKdAvYGpssMAean/WJY4jLidq3\nuJUHlA5QzQmtR9QqNIZBKzMxhAe2RrbrTn7Xu8C7c7DVN/3WTCcfzbWXK3/+\nZt07aIX2lo8r8Fo/b21JEG0fby7cVd0LYotcddhCi7nEThGu81Vwi8Wqr8z9\nGWrQrNzn3jN7HV3t10wxCO64YtzXcM/Ak+RBuuGmfah0WcMI0okrYkda30uc\nlc0xipd90XoHB2NeA8c93NT4PpF6HlEJme+xSQgtX4RQDGYI6KyPoxo8dcTo\n5Lu+Vjnr9K18plLe31ePxfuotwldpGOGlTNCmVhOtz7wf5IqbSt19cHaxida\nNVbult6zzr1nWGfaS0RfwfI0YQIJ410DJilZJyMH6nmM0HcaeXuKj8+hqlPR\ndcGD\r\n=f+8V\r\n-----END PGP SIGNATURE-----\r\n"
671 },
672 "maintainers": [
673 {
674 "name": "sindresorhus",
675 "email": "[email protected]"
676 }
677 ],
678 "directories": {},
679 "_npmOperationalInternal": {
680 "host": "s3://npm-registry-packages",
681 "tmp": "tmp/mem_4.1.0_1548837927747_0.5551694125271442"
682 },
683 "_hasShrinkwrap": false
684 },
685 "4.2.0": {
686 "name": "mem",
687 "version": "4.2.0",
688 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
689 "license": "MIT",
690 "repository": {
691 "type": "git",
692 "url": "git+https://github.com/sindresorhus/mem.git"
693 },
694 "author": {
695 "name": "Sindre Sorhus",
696 "email": "[email protected]",
697 "url": "sindresorhus.com"
698 },
699 "engines": {
700 "node": ">=6"
701 },
702 "scripts": {
703 "test": "xo && ava && tsd-check"
704 },
705 "keywords": [
706 "memoize",
707 "function",
708 "mem",
709 "memoization",
710 "cache",
711 "caching",
712 "optimize",
713 "performance",
714 "ttl",
715 "expire",
716 "promise"
717 ],
718 "dependencies": {
719 "map-age-cleaner": "^0.1.1",
720 "mimic-fn": "^2.0.0",
721 "p-is-promise": "^2.0.0"
722 },
723 "devDependencies": {
724 "ava": "^1.3.1",
725 "delay": "^4.1.0",
726 "tsd-check": "^0.3.0",
727 "xo": "^0.24.0"
728 },
729 "gitHead": "6959d903627d24da2e31a9da686327daf86f2dda",
730 "bugs": {
731 "url": "https://github.com/sindresorhus/mem/issues"
732 },
733 "homepage": "https://github.com/sindresorhus/mem#readme",
734 "_id": "[email protected]",
735 "_nodeVersion": "8.15.0",
736 "_npmVersion": "6.9.0",
737 "_npmUser": {
738 "name": "sindresorhus",
739 "email": "[email protected]"
740 },
741 "dist": {
742 "integrity": "sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA==",
743 "shasum": "5ee057680ed9cb8dad8a78d820f9a8897a102025",
744 "tarball": "https://registry.npmjs.org/mem/-/mem-4.2.0.tgz",
745 "fileCount": 5,
746 "unpackedSize": 9439,
747 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJch+9bCRA9TVsSAnZWagAAZQwP/izKtmuKD3r2Kmojxv4a\nhbbncg0yv5WADMvbNTubLytnN5O/c1GKTa+0G2HKBz3rjwJ/4KX09bzgyBig\nVcjDkouItaLxtfOG6EpcvLo8iAzBO3YcqLclW4mDorGzE4ba0LipupjA45gr\n/rpfHfYEINoxCmsy2ALwQrD96UtwGpk1bf3BY5CNapzmUntG1BNhVMpdGzlS\nwsjdBpSagMd8jTWR6YwnyoqfZ5HpvJ2jsfDNXMM6fjAxUd1iC2vkdBFcvDch\npMr+YiU265XbyWz9j2QdJH75bb0Cbfa8Zm3lK9VM46mgqRL2sdNKYopUW3f7\nrKXgMBrub+rofpVRs8nsyhGcLywaD07i84J+f/HxT+65Z9BbkRo89axDeOA2\nLe0N3QuABlIy+KNZV0CqwSYSK2/YPaeJtM2IJztotOIs/VDpAADRfBlZ7zRG\nyezLarB124645gln+LI0KpgQi6HvscCtGWzRTRNWT4X3VZpa3Z7u1/Xp/yt1\nWN/7AoBMBx2OMiESL7VAsP/kSc3Nk5+O02pDCe3InDu2yu9DIDiC3SfVImK5\n2S5u5Yfjnp1vAuoHBZihXVIlJGBtJQNruEC91Z/9jljJrJfSzBZOXGbFT1HE\nX3WtmiBgBaNmBlvc7cJLpQIhbQeJnirBy+B63EZNywG2XX1XciD+nYeHadoq\noVhr\r\n=2Jn0\r\n-----END PGP SIGNATURE-----\r\n"
748 },
749 "maintainers": [
750 {
751 "name": "sindresorhus",
752 "email": "[email protected]"
753 }
754 ],
755 "directories": {},
756 "_npmOperationalInternal": {
757 "host": "s3://npm-registry-packages",
758 "tmp": "tmp/mem_4.2.0_1552412506855_0.4573656395957444"
759 },
760 "_hasShrinkwrap": false
761 },
762 "4.3.0": {
763 "name": "mem",
764 "version": "4.3.0",
765 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
766 "license": "MIT",
767 "repository": {
768 "type": "git",
769 "url": "git+https://github.com/sindresorhus/mem.git"
770 },
771 "author": {
772 "name": "Sindre Sorhus",
773 "email": "[email protected]",
774 "url": "sindresorhus.com"
775 },
776 "engines": {
777 "node": ">=6"
778 },
779 "scripts": {
780 "test": "xo && ava && tsd"
781 },
782 "keywords": [
783 "memoize",
784 "function",
785 "mem",
786 "memoization",
787 "cache",
788 "caching",
789 "optimize",
790 "performance",
791 "ttl",
792 "expire",
793 "promise"
794 ],
795 "dependencies": {
796 "map-age-cleaner": "^0.1.1",
797 "mimic-fn": "^2.0.0",
798 "p-is-promise": "^2.0.0"
799 },
800 "devDependencies": {
801 "ava": "^1.4.1",
802 "delay": "^4.1.0",
803 "tsd": "^0.7.1",
804 "xo": "^0.24.0"
805 },
806 "gitHead": "0e9275ea32d5e5343eeab31ceb0271f9f42c85b5",
807 "bugs": {
808 "url": "https://github.com/sindresorhus/mem/issues"
809 },
810 "homepage": "https://github.com/sindresorhus/mem#readme",
811 "_id": "[email protected]",
812 "_nodeVersion": "8.15.0",
813 "_npmVersion": "6.9.0",
814 "_npmUser": {
815 "name": "sindresorhus",
816 "email": "[email protected]"
817 },
818 "dist": {
819 "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
820 "shasum": "461af497bc4ae09608cdb2e60eefb69bff744178",
821 "tarball": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
822 "fileCount": 5,
823 "unpackedSize": 9746,
824 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoRBQCRA9TVsSAnZWagAAibwP/05Hb2MoVvBJVTxbitFu\n64+CmL6LNZTanHNrNSPb6v7sXGFO+uvkjCC/Ebgk7lC9+H0rgUVODnpFSBqd\njXabw0R4FIqLc8Jf1hvZD02+kHwPBRGB9dHs6jP2gMw7WFTM0hArtCKAqEXg\nP21zLIw1yrNp8IatIZMAM/isJjl6MyGdBvDJKb5Zc9og8qiQ3bqHfzCLfBXf\nWCEylAtIT1TNYy20cROpsHBje4xKIWfQCQ1n9J+CqHt/VFiqb0OAGrIY1WCd\n9dh+L3eKdxTlcEejvb7myQCb4O5rCR3pZepJs1wTF5xJRz8RxT8fjvOvSH5O\nITpzt3NbSFDE2FkWPq5I4+Vd1S5I+A1w9kdbcFSnL5nTHVfLEWGZA0IAsdfc\nFMqAjINR9qdW+McQCjKTPUDgKg5OEUvcIhoTpIM47JuGTbUP/Px8DQhqC7Rb\njbjYWRs8d72I2edaNRhgnvJQsrm3f6N7kaPo2/q5gZfpfMPsn9sokrJkXPkA\n9axZaIQ2hpEqQNbctfQinlzIxx5dTjaDSoZ6rQbnHXYN+GjMrKqBanx5PcLg\nJg7Vz7Y29SckUVUUEE2P9/Qgdr+SgsNyN7ZBsSizjONqbwaoi0iAonw2Xp6T\nIf437lRzWSa9iqcvx+zlhkkBf1OU+AdE8nPwYu0Bz9M/bYPWj6Lg8umBRrHe\njaTN\r\n=55DC\r\n-----END PGP SIGNATURE-----\r\n"
825 },
826 "maintainers": [
827 {
828 "name": "sindresorhus",
829 "email": "[email protected]"
830 }
831 ],
832 "directories": {},
833 "_npmOperationalInternal": {
834 "host": "s3://npm-registry-packages",
835 "tmp": "tmp/mem_4.3.0_1554059343791_0.002943299052651671"
836 },
837 "_hasShrinkwrap": false
838 },
839 "5.0.0": {
840 "name": "mem",
841 "version": "5.0.0",
842 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
843 "license": "MIT",
844 "repository": {
845 "type": "git",
846 "url": "git+https://github.com/sindresorhus/mem.git"
847 },
848 "author": {
849 "name": "Sindre Sorhus",
850 "email": "[email protected]",
851 "url": "sindresorhus.com"
852 },
853 "engines": {
854 "node": ">=8"
855 },
856 "scripts": {
857 "test": "xo && ava && tsd"
858 },
859 "keywords": [
860 "memoize",
861 "function",
862 "mem",
863 "memoization",
864 "cache",
865 "caching",
866 "optimize",
867 "performance",
868 "ttl",
869 "expire",
870 "promise"
871 ],
872 "dependencies": {
873 "map-age-cleaner": "^0.1.3",
874 "mimic-fn": "^2.1.0",
875 "p-is-promise": "^2.1.0"
876 },
877 "devDependencies": {
878 "ava": "^1.4.1",
879 "delay": "^4.1.0",
880 "tsd": "^0.7.3",
881 "xo": "^0.24.0"
882 },
883 "gitHead": "05c983b2d96cd24747a310d80de7ae7ba92dc2db",
884 "bugs": {
885 "url": "https://github.com/sindresorhus/mem/issues"
886 },
887 "homepage": "https://github.com/sindresorhus/mem#readme",
888 "_id": "[email protected]",
889 "_nodeVersion": "8.16.0",
890 "_npmVersion": "6.9.0",
891 "_npmUser": {
892 "name": "sindresorhus",
893 "email": "[email protected]"
894 },
895 "dist": {
896 "integrity": "sha512-r0kKFSQy7ywj2AHxsCyRlIQqnqiazZBeOx6ZNVvfJtEEzqVMgvgp83tB30B9pcqfGDXXPHLuVgCXLwNE2Un6lQ==",
897 "shasum": "c50f16afce423279080b174f0864d014c46a54e6",
898 "tarball": "https://registry.npmjs.org/mem/-/mem-5.0.0.tgz",
899 "fileCount": 5,
900 "unpackedSize": 9679,
901 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc3u6OCRA9TVsSAnZWagAANxkP/0q5Gaqz00GnikC3Q906\n3zR5ROXRUy2bUUmXvPDn22zWkA+1TFdomdFtQIH1t/wUD/41CKxRTftHu0gL\nykEPgnRoR/Hcmo4p7pJz2Fn+sJOkahCxfCUy3kX+y6t9bsgoNlNiMCkwqRhy\nKVNeaph1aLIbS64FOpOKnB1gkJeLqpsh2X9caxKh+OEXhMNiV9c+8NMaa6x2\nq2oFiriGouV9PPLmUTkCyr1Y9BBD0PId77XyjkWG4S+eGh9Qw13VRtz284z9\nOowDnda8EQN4BxliLPOEy21EDAj/6HqB4VLF1s0AkNSY50sv3dcOrQztWlyH\nrTedA8Dg8Kbh0wcRjMPViqHFm1jgoBSl8O5fXE2G/tSCnEvreXdob8eOUYoK\n5zzjLf+lbLFt5sc1Z5xFsAyX0+qijEucSODfLVQk2Xj1cxvhpuuX0WBlTlGq\ngKQCWXA+ajsZY3/rY1ky1zlkxQq70RCunzg4yjTtVrDO2FvgOxpinR3Dybze\n0Y6+quP81RIHrm4FQtExo4/nO7NofgSYPS/6izyjPlpXV1+gURnSMxWcnXjy\nNjr6Es4NLtN/ZIcmGxA5wvWUEjUW8cPtct7A9BKExB8btVFZa0dJr5FsA1uZ\nid2dwexg4Px7jULup3H1EYqOhY2sNzAkX8/UiWDWcd5txJZ0OdPYWAKQo6fC\n8Pmd\r\n=GP2k\r\n-----END PGP SIGNATURE-----\r\n"
902 },
903 "maintainers": [
904 {
905 "name": "sindresorhus",
906 "email": "[email protected]"
907 }
908 ],
909 "directories": {},
910 "_npmOperationalInternal": {
911 "host": "s3://npm-registry-packages",
912 "tmp": "tmp/mem_5.0.0_1558113933912_0.8522334849958171"
913 },
914 "_hasShrinkwrap": false
915 },
916 "5.1.0": {
917 "name": "mem",
918 "version": "5.1.0",
919 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
920 "license": "MIT",
921 "repository": {
922 "type": "git",
923 "url": "git+https://github.com/sindresorhus/mem.git"
924 },
925 "author": {
926 "name": "Sindre Sorhus",
927 "email": "[email protected]",
928 "url": "sindresorhus.com"
929 },
930 "engines": {
931 "node": ">=8"
932 },
933 "scripts": {
934 "test": "xo && ava && tsd"
935 },
936 "keywords": [
937 "memoize",
938 "function",
939 "mem",
940 "memoization",
941 "cache",
942 "caching",
943 "optimize",
944 "performance",
945 "ttl",
946 "expire",
947 "promise"
948 ],
949 "dependencies": {
950 "map-age-cleaner": "^0.1.3",
951 "mimic-fn": "^2.1.0",
952 "p-is-promise": "^2.1.0"
953 },
954 "devDependencies": {
955 "ava": "^1.4.1",
956 "delay": "^4.1.0",
957 "tsd": "^0.7.3",
958 "xo": "^0.24.0"
959 },
960 "gitHead": "ce7f3b7135e32d80877dedf0f0b7bd3e14d0ad91",
961 "bugs": {
962 "url": "https://github.com/sindresorhus/mem/issues"
963 },
964 "homepage": "https://github.com/sindresorhus/mem#readme",
965 "_id": "[email protected]",
966 "_nodeVersion": "8.16.0",
967 "_npmVersion": "6.9.0",
968 "_npmUser": {
969 "name": "sindresorhus",
970 "email": "[email protected]"
971 },
972 "dist": {
973 "integrity": "sha512-9egM8rCo4wKiKuTwK1nFlSk39HbgluK93EgUmmboF85CVuKp7PoAwK3C8krkJeeFiH/ltExwVxcu+i2dKZYtDw==",
974 "shasum": "b94ee9b888d26928dd9d91cab107fa04b925730b",
975 "tarball": "https://registry.npmjs.org/mem/-/mem-5.1.0.tgz",
976 "fileCount": 5,
977 "unpackedSize": 9692,
978 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBO8+CRA9TVsSAnZWagAAYMIP/AqXJioq5I4sVO2IxRoB\nMVQEq8bieSUTDz33I3/J/3qhv8yDAzs6AqpqPtk4uSHwB9ze3LHkV8kPsv6m\nnMFddbVGs8Df7vAaxkuH6XdXiZmnx3QCSqA/a5hjTwuPKsd0qYnTsId6NyVo\nbhXrL8mR0AUQ0+KihQiAu9cjXKFSh32QeKqRR7/wmZ5Y2q06a9OsSd8BMlzW\nIAD/0PqjfNkb1LWmeJk6uXd8/N6Mk4Sd8INY/QdE2JaQac/aTsu7FM5r8J+z\n5aqpvlXdj7HVWs+cxsCw5W/VMybpsEgb7cCS9TPFvkZ8A0+5dGaKhE+xGkoG\nhMqnKtSGtB9voaZhiQYO7m1P1h+OrUM9nKosvgGA6+yhP4k/dXGjBgwS/+Bc\nzuArX4LrWIyV7cCu2JyqYWJHf+VFpgVgoSHG4jKvE0lyZ9pqsGuqGNeWqj62\nLkhrB+4s06cWlNI7ozWldgYVFrbjM4TEcQm8DHD4CXtoo9SifnbsSWbI+nmA\nyEUVAxLov3uYSpaOgwEWRomnT7Gk27Hx2wDR3TxI8TRdAnDoi3DK93Jjln45\nwjBYRkx7BGBTAecH5S3PxI7XmB0Y1RnihNAtPu9KInjG+VNLTFqHihUB24FE\nsxpoI157vi99gkDJdxsiVDWN9JZ3gdz7+3tCIYsJz5j+R4FjLKAWf6QOeHz5\n/2IV\r\n=ozSS\r\n-----END PGP SIGNATURE-----\r\n"
979 },
980 "maintainers": [
981 {
982 "name": "sindresorhus",
983 "email": "[email protected]"
984 }
985 ],
986 "directories": {},
987 "_npmOperationalInternal": {
988 "host": "s3://npm-registry-packages",
989 "tmp": "tmp/mem_5.1.0_1560604477397_0.4599413287436944"
990 },
991 "_hasShrinkwrap": false
992 },
993 "5.1.1": {
994 "name": "mem",
995 "version": "5.1.1",
996 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
997 "license": "MIT",
998 "repository": {
999 "type": "git",
1000 "url": "git+https://github.com/sindresorhus/mem.git"
1001 },
1002 "author": {
1003 "name": "Sindre Sorhus",
1004 "email": "[email protected]",
1005 "url": "sindresorhus.com"
1006 },
1007 "engines": {
1008 "node": ">=8"
1009 },
1010 "scripts": {
1011 "test": "xo && ava && tsd"
1012 },
1013 "keywords": [
1014 "memoize",
1015 "function",
1016 "mem",
1017 "memoization",
1018 "cache",
1019 "caching",
1020 "optimize",
1021 "performance",
1022 "ttl",
1023 "expire",
1024 "promise"
1025 ],
1026 "dependencies": {
1027 "map-age-cleaner": "^0.1.3",
1028 "mimic-fn": "^2.1.0",
1029 "p-is-promise": "^2.1.0"
1030 },
1031 "devDependencies": {
1032 "ava": "^1.4.1",
1033 "delay": "^4.1.0",
1034 "tsd": "^0.7.3",
1035 "xo": "^0.24.0"
1036 },
1037 "gitHead": "0ca0b20e1c9a6280028414fac43d2901a5ae105e",
1038 "bugs": {
1039 "url": "https://github.com/sindresorhus/mem/issues"
1040 },
1041 "homepage": "https://github.com/sindresorhus/mem#readme",
1042 "_id": "[email protected]",
1043 "_nodeVersion": "10.16.0",
1044 "_npmVersion": "6.9.0",
1045 "_npmUser": {
1046 "name": "sindresorhus",
1047 "email": "[email protected]"
1048 },
1049 "dist": {
1050 "integrity": "sha512-qvwipnozMohxLXG1pOqoLiZKNkC4r4qqRucSoDwXowsNGDSULiqFTRUF05vcZWnwJSG22qTsynQhxbaMtnX9gw==",
1051 "shasum": "7059b67bf9ac2c924c9f1cff7155a064394adfb3",
1052 "tarball": "https://registry.npmjs.org/mem/-/mem-5.1.1.tgz",
1053 "fileCount": 5,
1054 "unpackedSize": 9665,
1055 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdF8SfCRA9TVsSAnZWagAAtAUP/3PwwNDle7+CZdJ0/wwN\nJYtvXOxIbiTGG3UTKhMwep2dFHfKzdSSHFkXD4zlHJxr2HVZw0cY1jqKq9Kc\n8wHm362NsRLUpjmVj+q3e+KQnoKWdVY6aRFa9NJGnjZCwRnsp8IlDXCdsy2D\nrr9KqZlUOakSLC4jHc7sPVRccPq/ots1guP40VQR8DcIO/9M7waRGkLt90jI\nAjXx3BXDuYUoRb17qJNL09H3MEnaHQmxawIGxTpH3MmzGuq4dBv9/gQOC3+i\ngmWwM2iS9iJ6Zw3OfpdXUvkEK7QdrS+6y3yjsxgskgxLIACeOHyBbWY8Y4zG\n9oyMYjA20+9ZqK0xnG/uaZI3fbCuWJIRS+BVDtWZmT1yx4xrxAcMGG1MmwYi\nemDD14DmfLFGKaR6+C+ckuwcWroD2uQfQB6G5G5Eckj0E76OnFSHL1qv/qMJ\ndovcPiTNRar5Xch0tCw06hl5tnKo0xA11vyEhR7QaD+2DvVEVtYyJU3YdGiu\nX/Q6pNTrwWRzblHr19stDaGT7FOBLKtBYa1RpRxPgz5LrJEhAUctRUgjE5zj\nQqdJ+Eo0kw7o2L6qYvrpP4XVDu6DkcrmNQ3qXXGkbSelXeqWsssxOjA5G8FT\np98u5QkFZLhZ6/sWVCF78LIsLpXJHMcl/mpgRhQdoEfUAjkro1GUgew2VRu0\nJubW\r\n=qZTg\r\n-----END PGP SIGNATURE-----\r\n"
1056 },
1057 "maintainers": [
1058 {
1059 "name": "sindresorhus",
1060 "email": "[email protected]"
1061 }
1062 ],
1063 "directories": {},
1064 "_npmOperationalInternal": {
1065 "host": "s3://npm-registry-packages",
1066 "tmp": "tmp/mem_5.1.1_1561838751067_0.6864618207106226"
1067 },
1068 "_hasShrinkwrap": false
1069 },
1070 "6.0.0": {
1071 "name": "mem",
1072 "version": "6.0.0",
1073 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
1074 "license": "MIT",
1075 "repository": {
1076 "type": "git",
1077 "url": "git+https://github.com/sindresorhus/mem.git"
1078 },
1079 "author": {
1080 "name": "Sindre Sorhus",
1081 "email": "[email protected]",
1082 "url": "sindresorhus.com"
1083 },
1084 "engines": {
1085 "node": ">=8"
1086 },
1087 "scripts": {
1088 "test": "xo && ava && tsd"
1089 },
1090 "keywords": [
1091 "memoize",
1092 "function",
1093 "mem",
1094 "memoization",
1095 "cache",
1096 "caching",
1097 "optimize",
1098 "performance",
1099 "ttl",
1100 "expire",
1101 "promise"
1102 ],
1103 "dependencies": {
1104 "map-age-cleaner": "^0.1.3",
1105 "mimic-fn": "^3.0.0"
1106 },
1107 "devDependencies": {
1108 "ava": "^2.4.0",
1109 "delay": "^4.1.0",
1110 "serialize-javascript": "^2.1.0",
1111 "tsd": "^0.10.0",
1112 "xo": "^0.25.3"
1113 },
1114 "gitHead": "b154f53ad72ac76277c0cc2844febf1cd2df1795",
1115 "bugs": {
1116 "url": "https://github.com/sindresorhus/mem/issues"
1117 },
1118 "homepage": "https://github.com/sindresorhus/mem#readme",
1119 "_id": "[email protected]",
1120 "_nodeVersion": "12.13.0",
1121 "_npmVersion": "6.12.0",
1122 "_npmUser": {
1123 "name": "sindresorhus",
1124 "email": "[email protected]"
1125 },
1126 "dist": {
1127 "integrity": "sha512-1zHBKMg0Xd4yw3EQju6cjJiNtPomak7aNkuJx19QihMco09icTTsLZtVvxfxBxQH/NNvjtA1skR9lDlvkdW46g==",
1128 "shasum": "f79bb110b90b688a2d1468566e66a911794abee5",
1129 "tarball": "https://registry.npmjs.org/mem/-/mem-6.0.0.tgz",
1130 "fileCount": 5,
1131 "unpackedSize": 10414,
1132 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdySiRCRA9TVsSAnZWagAApMIQAIVALLVijqn6UMnu5XB9\nPGQBFSMU4FAAnnKCOj4lJT4whFHSFq1q3ZM3RbsrO0hklaZ7zmSBS7WenxsX\nc4W+GNlq/J04SpvgSw7/TEJdTWs85GqUDSuit8vtrLZvGdirJ6YN6MMdEF7a\nc79BEth2MdDcRgzmQtk0/1uQdbpbuhNfdpa8Gctcw0h9QeqcOj7tvUf6e3cw\nipTzMUwfhWt3p0ikfJLRTt6J+z8kZWGXZOzMNtWB2M8sxHm7Hnoj9+xKLLWd\nQt82tZcBbBh5cSKLCoEI78UqzzUQkbHN6GhxB2sOtAUEzYiJLpQDHWJ9NS+B\nCxEM+noUenh9sIBwMv4d7Wok+vWWIKSNUHnQ/7gObbvCD+0LFWir13k4K71v\n3+8eu8NKpQ0KEXE6/vpYj36i3wFVn3JIi03TFijoDvFyBVt9D23R8P3SVMOi\nhMR0niBp9IsMMwg+k1rhTSZdxbdrDK0aiivZmKLL6RvFj9/UxptUPHN5dvRN\nm7z1owYwhejspZLeV4X+U0H0xnV8I8Sx5pcXJdMyYI4zbpgTHqwogZGwHWHr\nRp5IeOZsxOHpC2AUvryww6Ohig19U+6ImRx6pq6uEKw2vpsd+xC9ecd67PT8\nwP1DYP1msfSupdIJoelMoDsdWlwFwG1yiEu0NXxjIRCd+SPfPiv8W9Wq2geS\noAR7\r\n=K9pr\r\n-----END PGP SIGNATURE-----\r\n"
1133 },
1134 "maintainers": [
1135 {
1136 "name": "sindresorhus",
1137 "email": "[email protected]"
1138 }
1139 ],
1140 "directories": {},
1141 "_npmOperationalInternal": {
1142 "host": "s3://npm-registry-packages",
1143 "tmp": "tmp/mem_6.0.0_1573464208617_0.15677627413666806"
1144 },
1145 "_hasShrinkwrap": false
1146 },
1147 "6.0.1": {
1148 "name": "mem",
1149 "version": "6.0.1",
1150 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
1151 "license": "MIT",
1152 "repository": {
1153 "type": "git",
1154 "url": "git+https://github.com/sindresorhus/mem.git"
1155 },
1156 "author": {
1157 "name": "Sindre Sorhus",
1158 "email": "[email protected]",
1159 "url": "sindresorhus.com"
1160 },
1161 "engines": {
1162 "node": ">=8"
1163 },
1164 "scripts": {
1165 "test": "xo && ava && tsd"
1166 },
1167 "keywords": [
1168 "memoize",
1169 "function",
1170 "mem",
1171 "memoization",
1172 "cache",
1173 "caching",
1174 "optimize",
1175 "performance",
1176 "ttl",
1177 "expire",
1178 "promise"
1179 ],
1180 "dependencies": {
1181 "map-age-cleaner": "^0.1.3",
1182 "mimic-fn": "^3.0.0"
1183 },
1184 "devDependencies": {
1185 "ava": "^2.4.0",
1186 "delay": "^4.1.0",
1187 "serialize-javascript": "^2.1.0",
1188 "tsd": "^0.11.0",
1189 "xo": "^0.25.3"
1190 },
1191 "gitHead": "9d5661e63642c250818306f37af8497eb61e2c11",
1192 "bugs": {
1193 "url": "https://github.com/sindresorhus/mem/issues"
1194 },
1195 "homepage": "https://github.com/sindresorhus/mem#readme",
1196 "_id": "[email protected]",
1197 "_nodeVersion": "13.2.0",
1198 "_npmVersion": "6.13.1",
1199 "dist": {
1200 "integrity": "sha512-uIRYASflIsXqvKe+7aXbLrydaRzz4qiK6amqZDQI++eRtW3UoKtnDcGeCAOREgll7YMxO5E4VB9+3B0LFmy96g==",
1201 "shasum": "3f8ad1b0f8c4e00daf07f104e95b9d78131d7908",
1202 "tarball": "https://registry.npmjs.org/mem/-/mem-6.0.1.tgz",
1203 "fileCount": 5,
1204 "unpackedSize": 10429,
1205 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4R1BCRA9TVsSAnZWagAAAAwP/RqVMRanVop8joy5Ixu5\nDfZFgJppajqPgFaaD2Q6hv9iyoQh6x7ua3625lmk5N2VmVIwz6FyYBbZ7tLv\ns6n0NOZj4f7j4uk8ri+Y5Tpzk1tdFEbf8IwTTiypSF79gQ5JI2wZLypw+R2g\n5Yrd/0ElvMj0cX4jPEnSLaV5zqw5Qx/zdPZYm9opf3gJ9e2JUB9z77Z7shjD\n9NlDwPrzAhUcCnUbt1hJWAQ0yu/EUQRi9z5Q8tLw3Bp9F8eP+ta6hdiHheIs\nvjEDqPa9MHMe/UyR9U5g1fjJ42OFsGFUYF/YLzh3ICnrokl/dJHuhXBMYDDK\nAbDnme6yRcPhFN+NoBSXGnTVOjc+J6W7KjEzMuU2C8lkGWmwj1DYVM1WLMX9\nrUQ1l68ZM3WcKOUWcB8YlUaoTU/7Wz9bJrtp+BMeNYZsu43lUaJDci4tA5zs\nrt0M4I6pZ78XySQC+hNtMHm+7A2tsAq4zUelcdPXSuGTtAGDnWU/hRddFcUo\nJRQ2pbb3XD8ovx1zvmqpsTFW5ZvP4k0mq32ms2Vg4lJbK3t8wgiePoSQGHqf\n7xLmvuVh9JAe2tPqTluE15BAto0BTf7Q8q4We0/W7NOjf6ZiT23MVK9dNWEr\nUMU6igz0gxlwFRjBhfCWjg5qs5QEBuWbMY0Hdc1U+m4yBuOUM0UP0HebJPsc\nSnQU\r\n=V5Wl\r\n-----END PGP SIGNATURE-----\r\n"
1206 },
1207 "maintainers": [
1208 {
1209 "email": "[email protected]",
1210 "name": "bfred-it"
1211 },
1212 {
1213 "email": "[email protected]",
1214 "name": "fregante"
1215 },
1216 {
1217 "email": "[email protected]",
1218 "name": "sindresorhus"
1219 }
1220 ],
1221 "_npmUser": {
1222 "name": "bfred-it",
1223 "email": "[email protected]"
1224 },
1225 "directories": {},
1226 "_npmOperationalInternal": {
1227 "host": "s3://npm-registry-packages",
1228 "tmp": "tmp/mem_6.0.1_1575034176954_0.8670781925593525"
1229 },
1230 "_hasShrinkwrap": false
1231 },
1232 "6.1.0": {
1233 "name": "mem",
1234 "version": "6.1.0",
1235 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
1236 "license": "MIT",
1237 "repository": {
1238 "type": "git",
1239 "url": "git+https://github.com/sindresorhus/mem.git"
1240 },
1241 "author": {
1242 "name": "Sindre Sorhus",
1243 "email": "[email protected]",
1244 "url": "sindresorhus.com"
1245 },
1246 "engines": {
1247 "node": ">=8"
1248 },
1249 "scripts": {
1250 "test": "xo && ava && tsd"
1251 },
1252 "keywords": [
1253 "memoize",
1254 "function",
1255 "mem",
1256 "memoization",
1257 "cache",
1258 "caching",
1259 "optimize",
1260 "performance",
1261 "ttl",
1262 "expire",
1263 "promise"
1264 ],
1265 "dependencies": {
1266 "map-age-cleaner": "^0.1.3",
1267 "mimic-fn": "^3.0.0"
1268 },
1269 "devDependencies": {
1270 "ava": "^2.4.0",
1271 "delay": "^4.1.0",
1272 "serialize-javascript": "^2.1.0",
1273 "tsd": "^0.11.0",
1274 "xo": "^0.25.3"
1275 },
1276 "gitHead": "4646f004f3b6e528ae889e7c82e75bf6d02b9263",
1277 "bugs": {
1278 "url": "https://github.com/sindresorhus/mem/issues"
1279 },
1280 "homepage": "https://github.com/sindresorhus/mem#readme",
1281 "_id": "[email protected]",
1282 "_nodeVersion": "10.19.0",
1283 "_npmVersion": "6.13.4",
1284 "_npmUser": {
1285 "name": "sindresorhus",
1286 "email": "[email protected]"
1287 },
1288 "dist": {
1289 "integrity": "sha512-RlbnLQgRHk5lwqTtpEkBTQ2ll/CG/iB+J4Hy2Wh97PjgZgXgWJWrFF+XXujh3UUVLvR4OOTgZzcWMMwnehlEUg==",
1290 "shasum": "846eca0bd4708a8f04b9c3f3cd769e194ae63c5c",
1291 "tarball": "https://registry.npmjs.org/mem/-/mem-6.1.0.tgz",
1292 "fileCount": 5,
1293 "unpackedSize": 13708,
1294 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJekyRWCRA9TVsSAnZWagAA/gcP/ivDrGo5uH8KK6kHAjGe\ns22brv0UtikMmp2ydYBrhofB2gAE6u3bg7oP3Emd8peZ/Cdf+Fo4vc3BVgpB\n/Z0IVBZxTAY41qsrWiyYCf9Uylx+/DQTNx9jiywmzLJLuqA9ftQdfbRi+bDW\nQ4OZWisaueEADUjdB7tmgIiSRCUS/DaKxdPfuR2llYR5A2K7ZP493vXM2isn\nUULsclpmM2m5rB97iI3HeFsPQ09+Ml0PQJ2/YDRvoIQI//jN64Gnq6InSecV\n8RIy/l5Pv1aFHQ1MT4UzrkMIVqifcbDwsR0J8ehZD94V08AAnh3w5eDA3TOR\nyQcjmbtcIongI3NVZzLL509Lgej3VhXYcck4fRUNGcnoFlapKhFLK1MzmOzu\nYgerETqJpaCtPmOYMD3SXW5ikjHxwR7ZSKLBt7EViSbX8uLSIsodW68YJ/lR\nsk0TSfr0aqEFYvd1LluPffH1j6ckxCswwYJUBiZzQX/11IkwKbtKi80Zd6sn\n2VvGiBjNdLB7yJjOInNtX1Tg2x07W8J+fEKZTq1uEY/v/DgXfUYCzqxqACWM\n/KCft58T1XzXeyKVu+Aw8dFKhDe8lEGCZk7jsiZgGiqt0OF/qtT6NVQNk09d\nBhsmNbFg+hof9ywYYw9TGQNV9o9Qgwu8PaBR6v2cxnvTnzHNbL3EpNnylUeL\nAwel\r\n=t8OY\r\n-----END PGP SIGNATURE-----\r\n"
1295 },
1296 "maintainers": [
1297 {
1298 "email": "[email protected]",
1299 "name": "bfred-it"
1300 },
1301 {
1302 "email": "[email protected]",
1303 "name": "fregante"
1304 },
1305 {
1306 "email": "[email protected]",
1307 "name": "sindresorhus"
1308 }
1309 ],
1310 "directories": {},
1311 "_npmOperationalInternal": {
1312 "host": "s3://npm-registry-packages",
1313 "tmp": "tmp/mem_6.1.0_1586701398069_0.07114174247388583"
1314 },
1315 "_hasShrinkwrap": false
1316 },
1317 "6.1.1": {
1318 "name": "mem",
1319 "version": "6.1.1",
1320 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
1321 "license": "MIT",
1322 "repository": {
1323 "type": "git",
1324 "url": "git+https://github.com/sindresorhus/mem.git"
1325 },
1326 "funding": "https://github.com/sindresorhus/mem?sponsor=1",
1327 "author": {
1328 "name": "Sindre Sorhus",
1329 "email": "[email protected]",
1330 "url": "https://sindresorhus.com"
1331 },
1332 "engines": {
1333 "node": ">=8"
1334 },
1335 "scripts": {
1336 "test": "xo && ava && tsd"
1337 },
1338 "keywords": [
1339 "memoize",
1340 "function",
1341 "mem",
1342 "memoization",
1343 "cache",
1344 "caching",
1345 "optimize",
1346 "performance",
1347 "ttl",
1348 "expire",
1349 "promise"
1350 ],
1351 "dependencies": {
1352 "map-age-cleaner": "^0.1.3",
1353 "mimic-fn": "^3.0.0"
1354 },
1355 "devDependencies": {
1356 "ava": "^2.4.0",
1357 "delay": "^4.1.0",
1358 "serialize-javascript": "^2.1.0",
1359 "tsd": "^0.11.0",
1360 "xo": "^0.25.3"
1361 },
1362 "gitHead": "807d7c0ef27c9d76fe682103ea39e6763abcf051",
1363 "bugs": {
1364 "url": "https://github.com/sindresorhus/mem/issues"
1365 },
1366 "homepage": "https://github.com/sindresorhus/mem#readme",
1367 "_id": "[email protected]",
1368 "_nodeVersion": "10.22.0",
1369 "_npmVersion": "6.14.7",
1370 "_npmUser": {
1371 "name": "sindresorhus",
1372 "email": "[email protected]"
1373 },
1374 "dist": {
1375 "integrity": "sha512-Ci6bIfq/UgcxPTYa8dQQ5FY3BzKkT894bwXWXxC/zqs0XgMO2cT20CGkOqda7gZNkmK5VP4x89IGZ6K7hfbn3Q==",
1376 "shasum": "ea110c2ebc079eca3022e6b08c85a795e77f6318",
1377 "tarball": "https://registry.npmjs.org/mem/-/mem-6.1.1.tgz",
1378 "fileCount": 5,
1379 "unpackedSize": 13465,
1380 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSs7sCRA9TVsSAnZWagAAZK0P/3AojGIRtoW/HY2kLu0g\n2I8IZjgy7wdYMdN3AdhjqntALhmtZUL8grm91hPAzJ+M05tBvgf7WBldwHkR\nnnnLQpTW+77OQ8inHG4uWvJssDAftJnsNRubQUX59UYZ0rv7hGXTR3xRZpdk\nPrEbSq71UD6SJzSSLQeo1HMd6WUWTEQr6LlEgtnQUzuHg03vLk5pVBCm+umF\nqlVjdmM+I7XOH33eiWLszzaj1z1Aq81LxvWA/+RK9Nnjx6XdaSGv4Hh0QQjc\nBk2w7JSqkwIXpI3baJXvURmsopHmFAJdGZuhbJiX6qW2dEtjeII/0h45Mv/j\nP4rYVD5VzSdZs/1t2witt0EtrsG6MHv6Aao12Y79c0k5Mwwre63JdpiIsXU/\nA5A8zA1AHDdjQglL5Pes2fxqCgtglqsqbWoiUWbg9NuOb1PxDckiXjY6gA4k\ni7jkFk15zElx4R+sIh0oc3rJuSQzIPes8jZ4XSrLAu+cuzwSaHqBuK+Dy22X\nEQkROCQ/z2yPmJrpMEoh/O8YI0bUc3qP8bvMveiUIols9MlRiYhGnbzQDRX/\nDdz9mz56LgAw5w7e+u6jx1oAGwS8ym07j+S7lmwkLY9ITHHLjiakrCXTgtAi\nU04l7a3VvpyTtYon98vxmYp5Nj+z1S7JT2wNNMXxODY6MxglZ3lyAXCNC/ZP\nkM9k\r\n=fB+m\r\n-----END PGP SIGNATURE-----\r\n"
1381 },
1382 "maintainers": [
1383 {
1384 "email": "[email protected]",
1385 "name": "fregante"
1386 },
1387 {
1388 "email": "[email protected]",
1389 "name": "sindresorhus"
1390 }
1391 ],
1392 "directories": {},
1393 "_npmOperationalInternal": {
1394 "host": "s3://npm-registry-packages",
1395 "tmp": "tmp/mem_6.1.1_1598738155686_0.25783327221446584"
1396 },
1397 "_hasShrinkwrap": false
1398 },
1399 "7.0.0-0": {
1400 "name": "mem",
1401 "version": "7.0.0-0",
1402 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
1403 "license": "MIT",
1404 "repository": {
1405 "type": "git",
1406 "url": "git+https://github.com/sindresorhus/mem.git"
1407 },
1408 "funding": "https://github.com/sindresorhus/mem?sponsor=1",
1409 "author": {
1410 "name": "Sindre Sorhus",
1411 "email": "[email protected]",
1412 "url": "https://sindresorhus.com"
1413 },
1414 "engines": {
1415 "node": ">=8"
1416 },
1417 "scripts": {
1418 "test": "xo && npm run build && ava",
1419 "build": "del-cli dist && tsc",
1420 "prepack": "npm run build"
1421 },
1422 "main": "dist",
1423 "keywords": [
1424 "memoize",
1425 "function",
1426 "mem",
1427 "memoization",
1428 "cache",
1429 "caching",
1430 "optimize",
1431 "performance",
1432 "ttl",
1433 "expire",
1434 "promise"
1435 ],
1436 "dependencies": {
1437 "map-age-cleaner": "^0.1.3",
1438 "mimic-fn": "^3.0.0"
1439 },
1440 "devDependencies": {
1441 "@ava/typescript": "^1.1.1",
1442 "@sindresorhus/tsconfig": "^0.7.0",
1443 "ava": "^2.4.0",
1444 "del-cli": "^3.0.1",
1445 "delay": "^4.1.0",
1446 "serialize-javascript": "^2.1.0",
1447 "typescript": "^4.0.3",
1448 "xo": "^0.25.3"
1449 },
1450 "readme": "# mem [![Build Status](https://travis-ci.org/sindresorhus/mem.svg?branch=master)](https://travis-ci.org/sindresorhus/mem)\n\n> [Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input\n\nMemory is automatically released when an item expires or the cache is cleared.\n\nBy default, **only the first argument is considered** and it only works with [primitives](https://developer.mozilla.org/en-US/docs/Glossary/Primitive). If you need to cache multiple arguments or cache `object`s *by value*, have a look at alternative [caching strategies](#caching-strategy) below.\n\n## Install\n\n```\n$ npm install mem\n```\n\n## Usage\n\n```js\nconst mem = require('mem');\n\nlet i = 0;\nconst counter = () => ++i;\nconst memoized = mem(counter);\n\nmemoized('foo');\n//=> 1\n\n// Cached as it's the same argument\nmemoized('foo');\n//=> 1\n\n// Not cached anymore as the argument changed\nmemoized('bar');\n//=> 2\n\nmemoized('bar');\n//=> 2\n\n// Only the first argument is considered by default\nmemoized('bar', 'foo');\n//=> 2\n```\n\n##### Works fine with promise returning functions\n\n```js\nconst mem = require('mem');\n\nlet i = 0;\nconst counter = async () => ++i;\nconst memoized = mem(counter);\n\n(async () => {\n\tconsole.log(await memoized());\n\t//=> 1\n\n\t// The return value didn't increase as it's cached\n\tconsole.log(await memoized());\n\t//=> 1\n})();\n```\n\n```js\nconst mem = require('mem');\nconst got = require('got');\nconst delay = require('delay');\n\nconst memGot = mem(got, {maxAge: 1000});\n\n(async () => {\n\tawait memGot('https://sindresorhus.com');\n\n\t// This call is cached\n\tawait memGot('https://sindresorhus.com');\n\n\tawait delay(2000);\n\n\t// This call is not cached as the cache has expired\n\tawait memGot('https://sindresorhus.com');\n})();\n```\n\n### Caching strategy\n\nBy default, only the first argument is compared via exact equality (`===`) to determine whether a call is identical.\n\n```js\nconst power = mem((a, b) => Math.power(a, b));\n\npower(2, 2); // => 4, stored in cache with the key 2 (number)\npower(2, 3); // => 4, retrieved from cache at key 2 (number), it's wrong\n```\n\nYou will have to use the `cache` and `cacheKey` options appropriate to your function. In this specific case, the following could work:\n\n```js\nconst power = mem((a, b) => Math.power(a, b), {\n cacheKey: arguments_ => arguments_.join(',')\n});\n\npower(2, 2); // => 4, stored in cache with the key '2,2' (both arguments as one string)\npower(2, 3); // => 8, stored in cache with the key '2,3'\n```\n\nMore advanced examples follow.\n\n#### Example: Options-like argument\n\nIf your function accepts an object, it won't be memoized out of the box:\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation);\n\nheavyMemoizedOperation({full: true}); // Stored in cache with the object as key\nheavyMemoizedOperation({full: true}); // Stored in cache with the object as key, again\n// The objects look the same but for JS they're two different objects\n```\n\nYou might want to serialize or hash them, for example using `JSON.stringify` or something like [serialize-javascript](https://github.com/yahoo/serialize-javascript), which can also serialize `RegExp`, `Date` and so on.\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation, {cacheKey: JSON.stringify});\n\nheavyMemoizedOperation({full: true}); // Stored in cache with the key '[{\"full\":true}]' (string)\nheavyMemoizedOperation({full: true}); // Retrieved from cache\n```\n\nThe same solution also works if it accepts multiple serializable objects:\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation, {cacheKey: JSON.stringify});\n\nheavyMemoizedOperation('hello', {full: true}); // Stored in cache with the key '[\"hello\",{\"full\":true}]' (string)\nheavyMemoizedOperation('hello', {full: true}); // Retrieved from cache\n```\n\n#### Example: Multiple non-serializable arguments\n\nIf your function accepts multiple arguments that aren't supported by `JSON.stringify` (e.g. DOM elements and functions), you can instead extend the initial exact equality (`===`) to work on multiple arguments using [`many-keys-map`](https://github.com/fregante/many-keys-map):\n\n```js\nconst ManyKeysMap = require('many-keys-map');\n\nconst addListener = (emitter, eventName, listener) => emitter.on(eventName, listener);\n\nconst addOneListener = mem(addListener, {\n\tcacheKey: arguments_ => arguments_, // Use *all* the arguments as key\n\tcache: new ManyKeysMap() // Correctly handles all the arguments for exact equality\n});\n\naddOneListener(header, 'click', console.log); // `addListener` is run, and it's cached with the `arguments` array as key\naddOneListener(header, 'click', console.log); // `addListener` is not run again\naddOneListener(mainContent, 'load', console.log); // `addListener` is run, and it's cached with the `arguments` array as key\n```\n\nBetter yet, if your function’s arguments are compatible with `WeakMap`, you should use [`deep-weak-map`](https://github.com/futpib/deep-weak-map) instead of `many-keys-map`. This will help avoid memory leaks.\n\n## API\n\n### mem(fn, options?)\n\n#### fn\n\nType: `Function`\n\nFunction to be memoized.\n\n#### options\n\nType: `object`\n\n##### maxAge\n\nType: `number`\\\nDefault: `Infinity`\n\nMilliseconds until the cache expires.\n\n##### cacheKey\n\nType: `Function`\\\nDefault: `arguments_ => arguments_[0]`\\\nExample: `arguments_ => JSON.stringify(arguments_)`\n\nDetermines the cache key for storing the result based on the function arguments. By default, **only the first argument is considered**.\n\nA `cacheKey` function can return any type supported by `Map` (or whatever structure you use in the `cache` option).\n\nRefer to the [caching strategies](#caching-strategy) section for more information.\n\n##### cache\n\nType: `object`\\\nDefault: `new Map()`\n\nUse a different cache storage. Must implement the following methods: `.has(key)`, `.get(key)`, `.set(key, value)`, `.delete(key)`, and optionally `.clear()`. You could for example use a `WeakMap` instead or [`quick-lru`](https://github.com/sindresorhus/quick-lru) for a LRU cache.\n\nRefer to the [caching strategies](#caching-strategy) section for more information.\n\n### mem.clear(fn)\n\nClear all cached data of a memoized function.\n\n#### fn\n\nType: `Function`\n\nMemoized function.\n\n## Tips\n\n### Cache statistics\n\nIf you want to know how many times your cache had a hit or a miss, you can make use of [stats-map](https://github.com/SamVerschueren/stats-map) as a replacement for the default cache.\n\n#### Example\n\n```js\nconst mem = require('mem');\nconst StatsMap = require('stats-map');\nconst got = require('got');\n\nconst cache = new StatsMap();\nconst memGot = mem(got, {cache});\n\n(async () => {\n\tawait memGot('https://sindresorhus.com');\n\tawait memGot('https://sindresorhus.com');\n\tawait memGot('https://sindresorhus.com');\n\n\tconsole.log(cache.stats);\n\t//=> {hits: 2, misses: 1}\n})();\n```\n\n## Related\n\n- [p-memoize](https://github.com/sindresorhus/p-memoize) - Memoize promise-returning & async functions\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-mem?utm_source=npm-mem&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n",
1451 "readmeFilename": "readme.md",
1452 "gitHead": "c7278273a12dc52f0d31fa32618e1c0c53e5f75a",
1453 "bugs": {
1454 "url": "https://github.com/sindresorhus/mem/issues"
1455 },
1456 "homepage": "https://github.com/sindresorhus/mem#readme",
1457 "_id": "[email protected]",
1458 "_nodeVersion": "14.4.0",
1459 "_npmVersion": "6.14.5",
1460 "dist": {
1461 "integrity": "sha512-zmKeaTcfG6grdWzOPBW0Vy73/sOmyoT6lGc07uVZ9Cjn1t6XYZ9E1ieXbI5+3zZ2kX5MujBkaDJA5C6W791e9w==",
1462 "shasum": "9c201deb5666116ce445083142152f2f7104d189",
1463 "tarball": "https://registry.npmjs.org/mem/-/mem-7.0.0-0.tgz",
1464 "fileCount": 5,
1465 "unpackedSize": 14501,
1466 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdT0mCRA9TVsSAnZWagAADrsP/13H2oo1gercgFuBkevB\nelZxcG2W8CagAsC2cOv/lgB+j4BC64ibivhew/klgvZkm5wd+IA9w8Edo7ly\npT+T8RDNNvGZmUaK7mgn9CxOgP5+dzKUMU09mfWBOvH7+ZZp3EDGAM3KmfXY\nhw1DwoWRQOhvHVLqU+EQ9wE6phohr4TgyK630Xp4BG8lbenYJIyapRZYob0N\nXwYQiASytVToetGHmjA1a2B60SK2+ccPTEgtbAX48zpsJ6rmNeVZaIHPxslb\ncSxwzwaOr7EGW3xPdffyYs5ewOqljdclWOOKeyjA/BaAdBvHtZYzOi13nb53\nycBsMr3KRGt1gtAj4xENelsy7yzpul43CoH6v1dvLEAxmqLg+Eyf0Z64OhcX\nOQ5HSWIvKpm9sR83GrUZ15XiHE9kYLqYhDPbyHZHSVMDFwQZMWpZDC++lUCI\nAAjcDXe73+7/B43JOucZvcX7kpepfe3O23VzszegUxiFxlpCb73xyfSOYrRb\ntwuFuzOzBEhGKkDGzf7Hn6fxmm2Wimd4aJJlA+mWRuX26SIdOJLGN301rJTc\nZX5t1HtwnL8b8WjQZGVSDX8Cd/oiveVnMOiSQCex5lEjByAesn0F8JUm7N8P\n37nNEObSnaAgc9WTbAhzcDSM+tdsA7OAEKf+NxZoWBv8CT9Nwvvgf4eU/3By\ng0Fd\r\n=Wr2S\r\n-----END PGP SIGNATURE-----\r\n"
1467 },
1468 "maintainers": [
1469 {
1470 "name": "sindresorhus",
1471 "email": "[email protected]"
1472 },
1473 {
1474 "name": "fregante",
1475 "email": "[email protected]"
1476 }
1477 ],
1478 "_npmUser": {
1479 "name": "fregante",
1480 "email": "[email protected]"
1481 },
1482 "directories": {},
1483 "_npmOperationalInternal": {
1484 "host": "s3://npm-registry-packages",
1485 "tmp": "tmp/mem_7.0.0-0_1601518885488_0.6127079045959467"
1486 },
1487 "_hasShrinkwrap": false
1488 },
1489 "7.0.0-1": {
1490 "name": "mem",
1491 "version": "7.0.0-1",
1492 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
1493 "license": "MIT",
1494 "repository": {
1495 "type": "git",
1496 "url": "git+https://github.com/sindresorhus/mem.git"
1497 },
1498 "funding": "https://github.com/sindresorhus/mem?sponsor=1",
1499 "author": {
1500 "name": "Sindre Sorhus",
1501 "email": "[email protected]",
1502 "url": "https://sindresorhus.com"
1503 },
1504 "engines": {
1505 "node": ">=8"
1506 },
1507 "scripts": {
1508 "test": "xo && npm run build && ava",
1509 "build": "del-cli dist && tsc",
1510 "prepack": "npm run build"
1511 },
1512 "main": "dist",
1513 "keywords": [
1514 "memoize",
1515 "function",
1516 "mem",
1517 "memoization",
1518 "cache",
1519 "caching",
1520 "optimize",
1521 "performance",
1522 "ttl",
1523 "expire",
1524 "promise"
1525 ],
1526 "dependencies": {
1527 "map-age-cleaner": "^0.1.3",
1528 "mimic-fn": "^3.0.0"
1529 },
1530 "devDependencies": {
1531 "@ava/typescript": "^1.1.1",
1532 "@sindresorhus/tsconfig": "^0.7.0",
1533 "ava": "^2.4.0",
1534 "del-cli": "^3.0.1",
1535 "delay": "^4.1.0",
1536 "serialize-javascript": "^2.1.0",
1537 "typescript": "^4.0.3",
1538 "xo": "^0.25.3"
1539 },
1540 "gitHead": "28a9618f00ec98162d26e5616595831c71a3472c",
1541 "bugs": {
1542 "url": "https://github.com/sindresorhus/mem/issues"
1543 },
1544 "homepage": "https://github.com/sindresorhus/mem#readme",
1545 "_id": "[email protected]",
1546 "_nodeVersion": "14.4.0",
1547 "_npmVersion": "6.14.5",
1548 "dist": {
1549 "integrity": "sha512-uZ27qn08m7TqY2eqjWuT/mhAPbZh384vsXEqNBLvn/4moZNPkZMaMoo06nawla+Nkk+JSMGUTgp9Hmn6QLe7Qg==",
1550 "shasum": "0a98d4c7f9f06bcb8b325fe50a14174255ec6f8d",
1551 "tarball": "https://registry.npmjs.org/mem/-/mem-7.0.0-1.tgz",
1552 "fileCount": 5,
1553 "unpackedSize": 14553,
1554 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdUN6CRA9TVsSAnZWagAAcn0P/2f7O60bD8oX9ougzo+s\ne5nXfdqS5jEdZ7VtLYn3J/XE7cr/KBL/2eKLNKXrnON4Vx/QZAYzAUcZT3Oe\nkmPRQtoArF2p3+IQkjLzc9ZsIuJYejtb7l05Kqm+lz7CxScTbEMgvAKcws1K\nABpLuaFwkCxhaYItLTJMuIiejNa4GyNNdO+dJ83WPC0DocHDs3jd3fo6UPYe\na14UWbnsZQWIV1GCs5wsGKQchhM7d25ZKCSDDB9HHjWbMq1ghXynsedZ2Fy5\nlKm0XNtYhCBH0wChYbD1yf5St+UXfZc7zzXaxNKgpp3SEeasAxg8C3VVVjMV\n0B5MNJ29FAGFlcZDS7L7+gXPuY0qb6GKMD4/29RpIQgI1PqFUUw1ipBQDma1\n3x4xyPT2DMACvc9VyFSxONhsGxXqNUSPML3lxcsHWEQQBAfFWh/M86ZWyNE1\nuwv6pJLrNclrZz8/Zm+xp4Qd47sFq6SG8ljPJLyJpCYpTnHAo9hMuNFeq8J5\nlbaUSwEQOG6nqpc5qGVBvE9NDMzNdx1ZFQd9UOy7Mg3zL4fg3TU2C2rNlFx+\n3SMMpYGYjNF2V2adikq3Bfsoq6YOHJ2rb21weIqm6qs1sJp5icFB/c045LGw\nGp6DJ2v9r9DyAa9LrCO1meMKQ9pd5Xy1zfRG8qAHxpAkjTO84kQiv038ChOJ\naqFN\r\n=F1tS\r\n-----END PGP SIGNATURE-----\r\n"
1555 },
1556 "maintainers": [
1557 {
1558 "name": "sindresorhus",
1559 "email": "[email protected]"
1560 },
1561 {
1562 "name": "fregante",
1563 "email": "[email protected]"
1564 }
1565 ],
1566 "_npmUser": {
1567 "name": "fregante",
1568 "email": "[email protected]"
1569 },
1570 "directories": {},
1571 "_npmOperationalInternal": {
1572 "host": "s3://npm-registry-packages",
1573 "tmp": "tmp/mem_7.0.0-1_1601520505592_0.17666955862077294"
1574 },
1575 "_hasShrinkwrap": false
1576 },
1577 "7.0.0-2": {
1578 "name": "mem",
1579 "version": "7.0.0-2",
1580 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
1581 "license": "MIT",
1582 "repository": {
1583 "type": "git",
1584 "url": "git+https://github.com/sindresorhus/mem.git"
1585 },
1586 "funding": "https://github.com/sindresorhus/mem?sponsor=1",
1587 "author": {
1588 "name": "Sindre Sorhus",
1589 "email": "[email protected]",
1590 "url": "https://sindresorhus.com"
1591 },
1592 "engines": {
1593 "node": ">=10"
1594 },
1595 "scripts": {
1596 "test": "xo && npm run build && ava",
1597 "build": "del-cli dist && tsc",
1598 "prepack": "npm run build"
1599 },
1600 "main": "dist",
1601 "keywords": [
1602 "memoize",
1603 "function",
1604 "mem",
1605 "memoization",
1606 "cache",
1607 "caching",
1608 "optimize",
1609 "performance",
1610 "ttl",
1611 "expire",
1612 "promise"
1613 ],
1614 "dependencies": {
1615 "map-age-cleaner": "^0.1.3",
1616 "mimic-fn": "^3.0.0"
1617 },
1618 "devDependencies": {
1619 "@ava/typescript": "^1.1.1",
1620 "@sindresorhus/tsconfig": "^0.7.0",
1621 "@types/serialize-javascript": "^4.0.0",
1622 "ava": "^3.13.0",
1623 "del-cli": "^3.0.1",
1624 "delay": "^4.1.0",
1625 "serialize-javascript": "^5.0.1",
1626 "typescript": "^4.0.3",
1627 "xo": "^0.33.1"
1628 },
1629 "ava": {
1630 "files": [
1631 "test.ts"
1632 ],
1633 "timeout": "1m",
1634 "typescript": {
1635 "rewritePaths": {
1636 "./": "dist/"
1637 }
1638 }
1639 },
1640 "xo": {
1641 "rules": {
1642 "@typescript-eslint/no-var-requires": "off",
1643 "@typescript-eslint/no-empty-function": "off"
1644 }
1645 },
1646 "readme": "# mem [![Build Status](https://travis-ci.org/sindresorhus/mem.svg?branch=master)](https://travis-ci.org/sindresorhus/mem)\n\n> [Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input\n\nMemory is automatically released when an item expires or the cache is cleared.\n\nBy default, **only the first argument is considered** and it only works with [primitives](https://developer.mozilla.org/en-US/docs/Glossary/Primitive). If you need to cache multiple arguments or cache `object`s *by value*, have a look at alternative [caching strategies](#caching-strategy) below.\n\n## Install\n\n```\n$ npm install mem\n```\n\n## Usage\n\n```js\nconst mem = require('mem');\n\nlet i = 0;\nconst counter = () => ++i;\nconst memoized = mem(counter);\n\nmemoized('foo');\n//=> 1\n\n// Cached as it's the same argument\nmemoized('foo');\n//=> 1\n\n// Not cached anymore as the argument changed\nmemoized('bar');\n//=> 2\n\nmemoized('bar');\n//=> 2\n\n// Only the first argument is considered by default\nmemoized('bar', 'foo');\n//=> 2\n```\n\n##### Works fine with promise returning functions\n\n```js\nconst mem = require('mem');\n\nlet i = 0;\nconst counter = async () => ++i;\nconst memoized = mem(counter);\n\n(async () => {\n\tconsole.log(await memoized());\n\t//=> 1\n\n\t// The return value didn't increase as it's cached\n\tconsole.log(await memoized());\n\t//=> 1\n})();\n```\n\n```js\nconst mem = require('mem');\nconst got = require('got');\nconst delay = require('delay');\n\nconst memGot = mem(got, {maxAge: 1000});\n\n(async () => {\n\tawait memGot('https://sindresorhus.com');\n\n\t// This call is cached\n\tawait memGot('https://sindresorhus.com');\n\n\tawait delay(2000);\n\n\t// This call is not cached as the cache has expired\n\tawait memGot('https://sindresorhus.com');\n})();\n```\n\n### Caching strategy\n\nBy default, only the first argument is compared via exact equality (`===`) to determine whether a call is identical.\n\n```js\nconst power = mem((a, b) => Math.power(a, b));\n\npower(2, 2); // => 4, stored in cache with the key 2 (number)\npower(2, 3); // => 4, retrieved from cache at key 2 (number), it's wrong\n```\n\nYou will have to use the `cache` and `cacheKey` options appropriate to your function. In this specific case, the following could work:\n\n```js\nconst power = mem((a, b) => Math.power(a, b), {\n cacheKey: arguments_ => arguments_.join(',')\n});\n\npower(2, 2); // => 4, stored in cache with the key '2,2' (both arguments as one string)\npower(2, 3); // => 8, stored in cache with the key '2,3'\n```\n\nMore advanced examples follow.\n\n#### Example: Options-like argument\n\nIf your function accepts an object, it won't be memoized out of the box:\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation);\n\nheavyMemoizedOperation({full: true}); // Stored in cache with the object as key\nheavyMemoizedOperation({full: true}); // Stored in cache with the object as key, again\n// The objects look the same but for JS they're two different objects\n```\n\nYou might want to serialize or hash them, for example using `JSON.stringify` or something like [serialize-javascript](https://github.com/yahoo/serialize-javascript), which can also serialize `RegExp`, `Date` and so on.\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation, {cacheKey: JSON.stringify});\n\nheavyMemoizedOperation({full: true}); // Stored in cache with the key '[{\"full\":true}]' (string)\nheavyMemoizedOperation({full: true}); // Retrieved from cache\n```\n\nThe same solution also works if it accepts multiple serializable objects:\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation, {cacheKey: JSON.stringify});\n\nheavyMemoizedOperation('hello', {full: true}); // Stored in cache with the key '[\"hello\",{\"full\":true}]' (string)\nheavyMemoizedOperation('hello', {full: true}); // Retrieved from cache\n```\n\n#### Example: Multiple non-serializable arguments\n\nIf your function accepts multiple arguments that aren't supported by `JSON.stringify` (e.g. DOM elements and functions), you can instead extend the initial exact equality (`===`) to work on multiple arguments using [`many-keys-map`](https://github.com/fregante/many-keys-map):\n\n```js\nconst ManyKeysMap = require('many-keys-map');\n\nconst addListener = (emitter, eventName, listener) => emitter.on(eventName, listener);\n\nconst addOneListener = mem(addListener, {\n\tcacheKey: arguments_ => arguments_, // Use *all* the arguments as key\n\tcache: new ManyKeysMap() // Correctly handles all the arguments for exact equality\n});\n\naddOneListener(header, 'click', console.log); // `addListener` is run, and it's cached with the `arguments` array as key\naddOneListener(header, 'click', console.log); // `addListener` is not run again\naddOneListener(mainContent, 'load', console.log); // `addListener` is run, and it's cached with the `arguments` array as key\n```\n\nBetter yet, if your function’s arguments are compatible with `WeakMap`, you should use [`deep-weak-map`](https://github.com/futpib/deep-weak-map) instead of `many-keys-map`. This will help avoid memory leaks.\n\n## API\n\n### mem(fn, options?)\n\n#### fn\n\nType: `Function`\n\nFunction to be memoized.\n\n#### options\n\nType: `object`\n\n##### maxAge\n\nType: `number`\\\nDefault: `Infinity`\n\nMilliseconds until the cache expires.\n\n##### cacheKey\n\nType: `Function`\\\nDefault: `arguments_ => arguments_[0]`\\\nExample: `arguments_ => JSON.stringify(arguments_)`\n\nDetermines the cache key for storing the result based on the function arguments. By default, **only the first argument is considered**.\n\nA `cacheKey` function can return any type supported by `Map` (or whatever structure you use in the `cache` option).\n\nRefer to the [caching strategies](#caching-strategy) section for more information.\n\n##### cache\n\nType: `object`\\\nDefault: `new Map()`\n\nUse a different cache storage. Must implement the following methods: `.has(key)`, `.get(key)`, `.set(key, value)`, `.delete(key)`, and optionally `.clear()`. You could for example use a `WeakMap` instead or [`quick-lru`](https://github.com/sindresorhus/quick-lru) for a LRU cache.\n\nRefer to the [caching strategies](#caching-strategy) section for more information.\n\n### mem.clear(fn)\n\nClear all cached data of a memoized function.\n\n#### fn\n\nType: `Function`\n\nMemoized function.\n\n## Tips\n\n### Cache statistics\n\nIf you want to know how many times your cache had a hit or a miss, you can make use of [stats-map](https://github.com/SamVerschueren/stats-map) as a replacement for the default cache.\n\n#### Example\n\n```js\nconst mem = require('mem');\nconst StatsMap = require('stats-map');\nconst got = require('got');\n\nconst cache = new StatsMap();\nconst memGot = mem(got, {cache});\n\n(async () => {\n\tawait memGot('https://sindresorhus.com');\n\tawait memGot('https://sindresorhus.com');\n\tawait memGot('https://sindresorhus.com');\n\n\tconsole.log(cache.stats);\n\t//=> {hits: 2, misses: 1}\n})();\n```\n\n## Related\n\n- [p-memoize](https://github.com/sindresorhus/p-memoize) - Memoize promise-returning & async functions\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-mem?utm_source=npm-mem&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n",
1647 "readmeFilename": "readme.md",
1648 "gitHead": "be5f6db8401486b597b280e40d18910690f6c737",
1649 "bugs": {
1650 "url": "https://github.com/sindresorhus/mem/issues"
1651 },
1652 "homepage": "https://github.com/sindresorhus/mem#readme",
1653 "_id": "[email protected]",
1654 "_nodeVersion": "14.4.0",
1655 "_npmVersion": "6.14.5",
1656 "dist": {
1657 "integrity": "sha512-Y5cusA/lEuuAC+a4JRsPsPDvCjqf1r3tdkGH7IZzSEsAoZb7vZod/xJQr2Cpybaud6QATYG+1ULce1hfu3iWMg==",
1658 "shasum": "f88933ed3b7843ba1a8a89ac99c2910223711bfb",
1659 "tarball": "https://registry.npmjs.org/mem/-/mem-7.0.0-2.tgz",
1660 "fileCount": 5,
1661 "unpackedSize": 14846,
1662 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdZw2CRA9TVsSAnZWagAAZv8P/2sMEi7zX3fIyWCohQ7h\n+Q6CVyEWMY/JVMXf59RLrdz/YW5GbrJFlCbJoO2OcIJmgjl+QQvNd/59xgxh\nwn5ttEub9E9cdQB0WE1ekmnKHxvX5JU2MAid7bWE7ZyAsVm/x1MfytOTjKuH\nKJ6Vmocln1mG7pSnRmsOV6/tY9R7+N0FgtEz/fxKguQmDHdQP7lS2jvUxdyf\nFzM86OZ8yVw4g6ktDAEruw7LyGBcYjbEeCY5rfosFU06SCEBxaFH6SJv/v/G\nMxZpJ8bTQclrAOlkyKgqe7Iir5Q9nQ0MgTwvQ9NiyjyN5pruCZCkz1ImQ3K8\nLIjkKReKMmTl8PDzGXPNXo7EY0ado4Ts3x/9HAcYEMvdM+3+bKEg67ClSgHs\n/BheWi34AHlGI5WHt13kRzp0RlCqJPXDPBzo1reVj/xYe9hoxt1Qu3nWsAh3\nQy3SUybKkqJBA1mbl+yPxtieWp3mlM07ty+njpPWkX4H6VGrmVk8Ri8TkMe8\nC07O+NVZsesLj03ITa1HVZH15r39Nk4JwK+BRRUS5MJkCnQyFwtcaqFNNKqR\n3eRwwlYsjzJ0ulrlhprqSZd/cVAY96a3T9cCwNMH3VjFYleX5wsSX5kxEBmc\neUYOKFBrOsKJ5kkAJFGh+8IJyxS5gYL3h+LYnmL3b2aCyxlX7RgDmrj01CKI\nuwEL\r\n=l7Nf\r\n-----END PGP SIGNATURE-----\r\n"
1663 },
1664 "maintainers": [
1665 {
1666 "name": "sindresorhus",
1667 "email": "[email protected]"
1668 },
1669 {
1670 "name": "fregante",
1671 "email": "[email protected]"
1672 }
1673 ],
1674 "_npmUser": {
1675 "name": "fregante",
1676 "email": "[email protected]"
1677 },
1678 "directories": {},
1679 "_npmOperationalInternal": {
1680 "host": "s3://npm-registry-packages",
1681 "tmp": "tmp/mem_7.0.0-2_1601543222172_0.814094441690246"
1682 },
1683 "_hasShrinkwrap": false
1684 },
1685 "7.0.0-3": {
1686 "name": "mem",
1687 "version": "7.0.0-3",
1688 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
1689 "license": "MIT",
1690 "repository": {
1691 "type": "git",
1692 "url": "git+https://github.com/sindresorhus/mem.git"
1693 },
1694 "funding": "https://github.com/sindresorhus/mem?sponsor=1",
1695 "author": {
1696 "name": "Sindre Sorhus",
1697 "email": "[email protected]",
1698 "url": "https://sindresorhus.com"
1699 },
1700 "engines": {
1701 "node": ">=10"
1702 },
1703 "scripts": {
1704 "test": "xo && npm run build && tsd && ava",
1705 "build": "del-cli dist && tsc",
1706 "prepack": "npm run build"
1707 },
1708 "main": "dist",
1709 "types": "dist/index.d.ts",
1710 "keywords": [
1711 "memoize",
1712 "function",
1713 "mem",
1714 "memoization",
1715 "cache",
1716 "caching",
1717 "optimize",
1718 "performance",
1719 "ttl",
1720 "expire",
1721 "promise"
1722 ],
1723 "dependencies": {
1724 "map-age-cleaner": "^0.1.3",
1725 "mimic-fn": "^3.0.0"
1726 },
1727 "devDependencies": {
1728 "@sindresorhus/tsconfig": "^0.7.0",
1729 "ava": "^3.13.0",
1730 "del-cli": "^3.0.1",
1731 "delay": "^4.1.0",
1732 "serialize-javascript": "^5.0.1",
1733 "tsd": "^0.13.1",
1734 "typescript": "^4.0.3",
1735 "xo": "^0.33.1"
1736 },
1737 "readme": "# mem [![Build Status](https://travis-ci.org/sindresorhus/mem.svg?branch=master)](https://travis-ci.org/sindresorhus/mem)\n\n> [Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input\n\nMemory is automatically released when an item expires or the cache is cleared.\n\nBy default, **only the first argument is considered** and it only works with [primitives](https://developer.mozilla.org/en-US/docs/Glossary/Primitive). If you need to cache multiple arguments or cache `object`s *by value*, have a look at alternative [caching strategies](#caching-strategy) below.\n\n## Install\n\n```\n$ npm install mem\n```\n\n## Usage\n\n```js\nconst mem = require('mem');\n\nlet i = 0;\nconst counter = () => ++i;\nconst memoized = mem(counter);\n\nmemoized('foo');\n//=> 1\n\n// Cached as it's the same argument\nmemoized('foo');\n//=> 1\n\n// Not cached anymore as the argument changed\nmemoized('bar');\n//=> 2\n\nmemoized('bar');\n//=> 2\n\n// Only the first argument is considered by default\nmemoized('bar', 'foo');\n//=> 2\n```\n\n##### Works fine with promise returning functions\n\n```js\nconst mem = require('mem');\n\nlet i = 0;\nconst counter = async () => ++i;\nconst memoized = mem(counter);\n\n(async () => {\n\tconsole.log(await memoized());\n\t//=> 1\n\n\t// The return value didn't increase as it's cached\n\tconsole.log(await memoized());\n\t//=> 1\n})();\n```\n\n```js\nconst mem = require('mem');\nconst got = require('got');\nconst delay = require('delay');\n\nconst memGot = mem(got, {maxAge: 1000});\n\n(async () => {\n\tawait memGot('https://sindresorhus.com');\n\n\t// This call is cached\n\tawait memGot('https://sindresorhus.com');\n\n\tawait delay(2000);\n\n\t// This call is not cached as the cache has expired\n\tawait memGot('https://sindresorhus.com');\n})();\n```\n\n### Caching strategy\n\nBy default, only the first argument is compared via exact equality (`===`) to determine whether a call is identical.\n\n```js\nconst power = mem((a, b) => Math.power(a, b));\n\npower(2, 2); // => 4, stored in cache with the key 2 (number)\npower(2, 3); // => 4, retrieved from cache at key 2 (number), it's wrong\n```\n\nYou will have to use the `cache` and `cacheKey` options appropriate to your function. In this specific case, the following could work:\n\n```js\nconst power = mem((a, b) => Math.power(a, b), {\n cacheKey: arguments_ => arguments_.join(',')\n});\n\npower(2, 2); // => 4, stored in cache with the key '2,2' (both arguments as one string)\npower(2, 3); // => 8, stored in cache with the key '2,3'\n```\n\nMore advanced examples follow.\n\n#### Example: Options-like argument\n\nIf your function accepts an object, it won't be memoized out of the box:\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation);\n\nheavyMemoizedOperation({full: true}); // Stored in cache with the object as key\nheavyMemoizedOperation({full: true}); // Stored in cache with the object as key, again\n// The objects look the same but for JS they're two different objects\n```\n\nYou might want to serialize or hash them, for example using `JSON.stringify` or something like [serialize-javascript](https://github.com/yahoo/serialize-javascript), which can also serialize `RegExp`, `Date` and so on.\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation, {cacheKey: JSON.stringify});\n\nheavyMemoizedOperation({full: true}); // Stored in cache with the key '[{\"full\":true}]' (string)\nheavyMemoizedOperation({full: true}); // Retrieved from cache\n```\n\nThe same solution also works if it accepts multiple serializable objects:\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation, {cacheKey: JSON.stringify});\n\nheavyMemoizedOperation('hello', {full: true}); // Stored in cache with the key '[\"hello\",{\"full\":true}]' (string)\nheavyMemoizedOperation('hello', {full: true}); // Retrieved from cache\n```\n\n#### Example: Multiple non-serializable arguments\n\nIf your function accepts multiple arguments that aren't supported by `JSON.stringify` (e.g. DOM elements and functions), you can instead extend the initial exact equality (`===`) to work on multiple arguments using [`many-keys-map`](https://github.com/fregante/many-keys-map):\n\n```js\nconst ManyKeysMap = require('many-keys-map');\n\nconst addListener = (emitter, eventName, listener) => emitter.on(eventName, listener);\n\nconst addOneListener = mem(addListener, {\n\tcacheKey: arguments_ => arguments_, // Use *all* the arguments as key\n\tcache: new ManyKeysMap() // Correctly handles all the arguments for exact equality\n});\n\naddOneListener(header, 'click', console.log); // `addListener` is run, and it's cached with the `arguments` array as key\naddOneListener(header, 'click', console.log); // `addListener` is not run again\naddOneListener(mainContent, 'load', console.log); // `addListener` is run, and it's cached with the `arguments` array as key\n```\n\nBetter yet, if your function’s arguments are compatible with `WeakMap`, you should use [`deep-weak-map`](https://github.com/futpib/deep-weak-map) instead of `many-keys-map`. This will help avoid memory leaks.\n\n## API\n\n### mem(fn, options?)\n\n#### fn\n\nType: `Function`\n\nFunction to be memoized.\n\n#### options\n\nType: `object`\n\n##### maxAge\n\nType: `number`\\\nDefault: `Infinity`\n\nMilliseconds until the cache expires.\n\n##### cacheKey\n\nType: `Function`\\\nDefault: `arguments_ => arguments_[0]`\\\nExample: `arguments_ => JSON.stringify(arguments_)`\n\nDetermines the cache key for storing the result based on the function arguments. By default, **only the first argument is considered**.\n\nA `cacheKey` function can return any type supported by `Map` (or whatever structure you use in the `cache` option).\n\nRefer to the [caching strategies](#caching-strategy) section for more information.\n\n##### cache\n\nType: `object`\\\nDefault: `new Map()`\n\nUse a different cache storage. Must implement the following methods: `.has(key)`, `.get(key)`, `.set(key, value)`, `.delete(key)`, and optionally `.clear()`. You could for example use a `WeakMap` instead or [`quick-lru`](https://github.com/sindresorhus/quick-lru) for a LRU cache.\n\nRefer to the [caching strategies](#caching-strategy) section for more information.\n\n### mem.clear(fn)\n\nClear all cached data of a memoized function.\n\n#### fn\n\nType: `Function`\n\nMemoized function.\n\n## Tips\n\n### Cache statistics\n\nIf you want to know how many times your cache had a hit or a miss, you can make use of [stats-map](https://github.com/SamVerschueren/stats-map) as a replacement for the default cache.\n\n#### Example\n\n```js\nconst mem = require('mem');\nconst StatsMap = require('stats-map');\nconst got = require('got');\n\nconst cache = new StatsMap();\nconst memGot = mem(got, {cache});\n\n(async () => {\n\tawait memGot('https://sindresorhus.com');\n\tawait memGot('https://sindresorhus.com');\n\tawait memGot('https://sindresorhus.com');\n\n\tconsole.log(cache.stats);\n\t//=> {hits: 2, misses: 1}\n})();\n```\n\n## Related\n\n- [p-memoize](https://github.com/sindresorhus/p-memoize) - Memoize promise-returning & async functions\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-mem?utm_source=npm-mem&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n",
1738 "readmeFilename": "readme.md",
1739 "gitHead": "de486e4b344fd4f4315aecb4055a8c4e8e119d86",
1740 "bugs": {
1741 "url": "https://github.com/sindresorhus/mem/issues"
1742 },
1743 "homepage": "https://github.com/sindresorhus/mem#readme",
1744 "_id": "[email protected]",
1745 "_nodeVersion": "14.4.0",
1746 "_npmVersion": "6.14.5",
1747 "dist": {
1748 "integrity": "sha512-kUcydKLeeoGt0YyhawhBvZne2SlsBeXHWBKcgW7GGX3fJ3XT3ogsoCjVHkPl0Dfpz1XyZNUiZ9UcfK8nTl4Fvw==",
1749 "shasum": "d3c44d02713c56eb196ed959cc530c68474ec8cd",
1750 "tarball": "https://registry.npmjs.org/mem/-/mem-7.0.0-3.tgz",
1751 "fileCount": 5,
1752 "unpackedSize": 14571,
1753 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffA3wCRA9TVsSAnZWagAAvrkP/jQb2B/WRzKm+OZGnMF9\nA0xWhoJpARxgYJedmzbDOXF9rdX8tFbNNfsX2ds3yUFR2Tn82XGfweUvHkp2\npsVBvZ9M2itGsVy/AMe+bAGBSSG8sXdHlTMLWna8X35xpKgXnVHCDZOl6HW1\nM6R27p2fXhpOz3o+7l+/T/vciIxYIZLFd4eZQ9Jfn6bzDnuN+Mf86Yp3vLKw\n/uAL3xXV5nsAilgR/5nWNuJB52+ce8Fj9lWXpCUIDRWRkV0Vc14bWH9R0w9y\nz5rRPTeCvspOQPO/6+1Y5sLmBoOZf7D4WdatWfh1vYOjBsNYmHN0RQtq99hm\nMFIZO+/Hf/K3wXYxOO/RHcsK2weQd5sD2u7fzjBbqqLcEUBMl8SuCK7OrQK5\nn7Y9HbwIIB+XEpSgZCYnt4NT50AwROMCcUFBLg8Cho8Omzi3PUPV9DCkXL63\ndfSpA2tbcUxHBLg34Zb14/K+QxZLM4IPj+8W0ntpLhPfDu+iQetphlr7LKDc\nR7tbNBcebZhMbuV4wA3xUizDL60HHZkkSQkN5gIftF3QYu7J4pIHXbLybVN6\nuFCsSXuwYZWSqbaNC9ZkcR6yrGYgX0Vi3JUrvkO+KU5wgbXw6fw9g83zOZ3K\nGlT0TOdnRUKsidQns1jeUW2VjdeBkP18q2CYhVnH0fFANIzIh2yyEg0qypHD\nN/Uk\r\n=1d8d\r\n-----END PGP SIGNATURE-----\r\n"
1754 },
1755 "maintainers": [
1756 {
1757 "name": "sindresorhus",
1758 "email": "[email protected]"
1759 },
1760 {
1761 "name": "fregante",
1762 "email": "[email protected]"
1763 }
1764 ],
1765 "_npmUser": {
1766 "name": "fregante",
1767 "email": "[email protected]"
1768 },
1769 "directories": {},
1770 "_npmOperationalInternal": {
1771 "host": "s3://npm-registry-packages",
1772 "tmp": "tmp/mem_7.0.0-3_1601965551939_0.5177473435317104"
1773 },
1774 "_hasShrinkwrap": false
1775 },
1776 "8.0.0": {
1777 "name": "mem",
1778 "version": "8.0.0",
1779 "description": "Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input",
1780 "license": "MIT",
1781 "repository": {
1782 "type": "git",
1783 "url": "git+https://github.com/sindresorhus/mem.git"
1784 },
1785 "funding": "https://github.com/sindresorhus/mem?sponsor=1",
1786 "author": {
1787 "name": "Sindre Sorhus",
1788 "email": "[email protected]",
1789 "url": "https://sindresorhus.com"
1790 },
1791 "engines": {
1792 "node": ">=10"
1793 },
1794 "scripts": {
1795 "test": "xo && npm run build && tsd && ava",
1796 "build": "del-cli dist && tsc",
1797 "prepack": "npm run build"
1798 },
1799 "main": "dist",
1800 "types": "dist/index.d.ts",
1801 "keywords": [
1802 "memoize",
1803 "function",
1804 "mem",
1805 "memoization",
1806 "cache",
1807 "caching",
1808 "optimize",
1809 "performance",
1810 "ttl",
1811 "expire",
1812 "promise"
1813 ],
1814 "dependencies": {
1815 "map-age-cleaner": "^0.1.3",
1816 "mimic-fn": "^3.1.0"
1817 },
1818 "devDependencies": {
1819 "@ava/typescript": "^1.1.1",
1820 "@sindresorhus/tsconfig": "^0.7.0",
1821 "@types/serialize-javascript": "^4.0.0",
1822 "ava": "^3.13.0",
1823 "del-cli": "^3.0.1",
1824 "delay": "^4.4.0",
1825 "serialize-javascript": "^5.0.1",
1826 "tsd": "^0.13.1",
1827 "typescript": "^4.0.3",
1828 "xo": "^0.33.1"
1829 },
1830 "ava": {
1831 "files": [
1832 "test.ts"
1833 ],
1834 "timeout": "1m",
1835 "typescript": {
1836 "rewritePaths": {
1837 "./": "dist/"
1838 }
1839 }
1840 },
1841 "xo": {
1842 "rules": {
1843 "@typescript-eslint/member-ordering": "off",
1844 "@typescript-eslint/no-var-requires": "off",
1845 "@typescript-eslint/no-empty-function": "off"
1846 }
1847 },
1848 "gitHead": "3bbfa2439df58e46ba917aa3e7eb0d9d0bccc0f2",
1849 "bugs": {
1850 "url": "https://github.com/sindresorhus/mem/issues"
1851 },
1852 "homepage": "https://github.com/sindresorhus/mem#readme",
1853 "_id": "[email protected]",
1854 "_nodeVersion": "14.11.0",
1855 "_npmVersion": "6.14.8",
1856 "_npmUser": {
1857 "name": "sindresorhus",
1858 "email": "[email protected]"
1859 },
1860 "dist": {
1861 "integrity": "sha512-qrcJOe6uD+EW8Wrci1Vdiua/15Xw3n/QnaNXE7varnB6InxSk7nu3/i5jfy3S6kWxr8WYJ6R1o0afMUtvorTsA==",
1862 "shasum": "b5e4b6d2d241c6296da05436173b4d0c7ae1f9ac",
1863 "tarball": "https://registry.npmjs.org/mem/-/mem-8.0.0.tgz",
1864 "fileCount": 5,
1865 "unpackedSize": 15059,
1866 "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgeCRCRA9TVsSAnZWagAAwjsP/jh/hMLThPYEBbmz58b8\nA62N2CN+gNR/q0FWbs8A9CFzIdd0XccRXQyKjRA6Z5Sg9DMNoaGVazhBtRh+\nStjGr3JZ2ZANELeTWalZEZ+7Agql7un2VaqcmMmbyaBNgNOSxaEWNhfHiRlD\nEq9aXXSEPjIHLF6UArdQ/eqLesb40CJZJ5/mjXNtJKETJpLLOV2RWnwUuuyK\nrnXqKczmNv0n/zGk4WZh484ICggFOFnzlYpb1eaDHs0rRogx07q3cuI2jDYH\nLFRosbBIGBWUmVEfiyyapXEQYqzKZbOnyjw4IbsszAv+s4RIOJQYQVEMS7xX\nB+fFoowfqmO9KqUiWENXhFwZOd4JRGY7VsUIdb2lo3vwFyxPOleXEQ1VR9jG\nm5P2mhW2f8dqTXYXjMrYLStmpdTeH+TPtWABTRavQvz4P3aGHa9ZiMyxKGkV\ndAEEzLfPmJg94RkLgowm1coFMK09nJoeHZPoFenKusZEBWfHpgp7B6N9pw9u\n10l2BDwwDDhjXl1BjPVKcnLhhjCeGiSma9fEICbKIT7ZxJKPJb2V8IuJhYNg\nGUGUJ90LtMFaKhCMiIYgs7KFrinyBCygpsfeM20A9BfrfhSh8KyZHKbKHFq4\nk0NBKFLBgZ63TlL0Dm4DAF8IxxIMuXdQcmaRNgQWhO4C5fWpqQDKFuAtU31o\nwSW2\r\n=uC19\r\n-----END PGP SIGNATURE-----\r\n"
1867 },
1868 "maintainers": [
1869 {
1870 "name": "sindresorhus",
1871 "email": "[email protected]"
1872 },
1873 {
1874 "name": "fregante",
1875 "email": "[email protected]"
1876 }
1877 ],
1878 "directories": {},
1879 "_npmOperationalInternal": {
1880 "host": "s3://npm-registry-packages",
1881 "tmp": "tmp/mem_8.0.0_1602347152712_0.37521709756771005"
1882 },
1883 "_hasShrinkwrap": false
1884 }
1885 },
1886 "readme": "# mem [![Build Status](https://travis-ci.com/sindresorhus/mem.svg?branch=master)](https://travis-ci.com/github/sindresorhus/mem)\n\n> [Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input\n\nMemory is automatically released when an item expires or the cache is cleared.\n\nBy default, **only the first argument is considered** and it only works with [primitives](https://developer.mozilla.org/en-US/docs/Glossary/Primitive). If you need to cache multiple arguments or cache `object`s *by value*, have a look at alternative [caching strategies](#caching-strategy) below.\n\n## Install\n\n```\n$ npm install mem\n```\n\n## Usage\n\n```js\nconst mem = require('mem');\n\nlet i = 0;\nconst counter = () => ++i;\nconst memoized = mem(counter);\n\nmemoized('foo');\n//=> 1\n\n// Cached as it's the same argument\nmemoized('foo');\n//=> 1\n\n// Not cached anymore as the argument changed\nmemoized('bar');\n//=> 2\n\nmemoized('bar');\n//=> 2\n\n// Only the first argument is considered by default\nmemoized('bar', 'foo');\n//=> 2\n```\n\n##### Works fine with promise returning functions\n\n```js\nconst mem = require('mem');\n\nlet i = 0;\nconst counter = async () => ++i;\nconst memoized = mem(counter);\n\n(async () => {\n\tconsole.log(await memoized());\n\t//=> 1\n\n\t// The return value didn't increase as it's cached\n\tconsole.log(await memoized());\n\t//=> 1\n})();\n```\n\n```js\nconst mem = require('mem');\nconst got = require('got');\nconst delay = require('delay');\n\nconst memGot = mem(got, {maxAge: 1000});\n\n(async () => {\n\tawait memGot('https://sindresorhus.com');\n\n\t// This call is cached\n\tawait memGot('https://sindresorhus.com');\n\n\tawait delay(2000);\n\n\t// This call is not cached as the cache has expired\n\tawait memGot('https://sindresorhus.com');\n})();\n```\n\n### Caching strategy\n\nBy default, only the first argument is compared via exact equality (`===`) to determine whether a call is identical.\n\n```js\nconst power = mem((a, b) => Math.power(a, b));\n\npower(2, 2); // => 4, stored in cache with the key 2 (number)\npower(2, 3); // => 4, retrieved from cache at key 2 (number), it's wrong\n```\n\nYou will have to use the `cache` and `cacheKey` options appropriate to your function. In this specific case, the following could work:\n\n```js\nconst power = mem((a, b) => Math.power(a, b), {\n cacheKey: arguments_ => arguments_.join(',')\n});\n\npower(2, 2); // => 4, stored in cache with the key '2,2' (both arguments as one string)\npower(2, 3); // => 8, stored in cache with the key '2,3'\n```\n\nMore advanced examples follow.\n\n#### Example: Options-like argument\n\nIf your function accepts an object, it won't be memoized out of the box:\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation);\n\nheavyMemoizedOperation({full: true}); // Stored in cache with the object as key\nheavyMemoizedOperation({full: true}); // Stored in cache with the object as key, again\n// The objects look the same but for JS they're two different objects\n```\n\nYou might want to serialize or hash them, for example using `JSON.stringify` or something like [serialize-javascript](https://github.com/yahoo/serialize-javascript), which can also serialize `RegExp`, `Date` and so on.\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation, {cacheKey: JSON.stringify});\n\nheavyMemoizedOperation({full: true}); // Stored in cache with the key '[{\"full\":true}]' (string)\nheavyMemoizedOperation({full: true}); // Retrieved from cache\n```\n\nThe same solution also works if it accepts multiple serializable objects:\n\n```js\nconst heavyMemoizedOperation = mem(heavyOperation, {cacheKey: JSON.stringify});\n\nheavyMemoizedOperation('hello', {full: true}); // Stored in cache with the key '[\"hello\",{\"full\":true}]' (string)\nheavyMemoizedOperation('hello', {full: true}); // Retrieved from cache\n```\n\n#### Example: Multiple non-serializable arguments\n\nIf your function accepts multiple arguments that aren't supported by `JSON.stringify` (e.g. DOM elements and functions), you can instead extend the initial exact equality (`===`) to work on multiple arguments using [`many-keys-map`](https://github.com/fregante/many-keys-map):\n\n```js\nconst ManyKeysMap = require('many-keys-map');\n\nconst addListener = (emitter, eventName, listener) => emitter.on(eventName, listener);\n\nconst addOneListener = mem(addListener, {\n\tcacheKey: arguments_ => arguments_, // Use *all* the arguments as key\n\tcache: new ManyKeysMap() // Correctly handles all the arguments for exact equality\n});\n\naddOneListener(header, 'click', console.log); // `addListener` is run, and it's cached with the `arguments` array as key\naddOneListener(header, 'click', console.log); // `addListener` is not run again\naddOneListener(mainContent, 'load', console.log); // `addListener` is run, and it's cached with the `arguments` array as key\n```\n\nBetter yet, if your function’s arguments are compatible with `WeakMap`, you should use [`deep-weak-map`](https://github.com/futpib/deep-weak-map) instead of `many-keys-map`. This will help avoid memory leaks.\n\n## API\n\n### mem(fn, options?)\n\n#### fn\n\nType: `Function`\n\nFunction to be memoized.\n\n#### options\n\nType: `object`\n\n##### maxAge\n\nType: `number`\\\nDefault: `Infinity`\n\nMilliseconds until the cache expires.\n\n##### cacheKey\n\nType: `Function`\\\nDefault: `arguments_ => arguments_[0]`\\\nExample: `arguments_ => JSON.stringify(arguments_)`\n\nDetermines the cache key for storing the result based on the function arguments. By default, **only the first argument is considered**.\n\nA `cacheKey` function can return any type supported by `Map` (or whatever structure you use in the `cache` option).\n\nRefer to the [caching strategies](#caching-strategy) section for more information.\n\n##### cache\n\nType: `object`\\\nDefault: `new Map()`\n\nUse a different cache storage. Must implement the following methods: `.has(key)`, `.get(key)`, `.set(key, value)`, `.delete(key)`, and optionally `.clear()`. You could for example use a `WeakMap` instead or [`quick-lru`](https://github.com/sindresorhus/quick-lru) for a LRU cache.\n\nRefer to the [caching strategies](#caching-strategy) section for more information.\n\n### mem.clear(fn)\n\nClear all cached data of a memoized function.\n\n#### fn\n\nType: `Function`\n\nMemoized function.\n\n## Tips\n\n### Cache statistics\n\nIf you want to know how many times your cache had a hit or a miss, you can make use of [stats-map](https://github.com/SamVerschueren/stats-map) as a replacement for the default cache.\n\n#### Example\n\n```js\nconst mem = require('mem');\nconst StatsMap = require('stats-map');\nconst got = require('got');\n\nconst cache = new StatsMap();\nconst memGot = mem(got, {cache});\n\n(async () => {\n\tawait memGot('https://sindresorhus.com');\n\tawait memGot('https://sindresorhus.com');\n\tawait memGot('https://sindresorhus.com');\n\n\tconsole.log(cache.stats);\n\t//=> {hits: 2, misses: 1}\n})();\n```\n\n## Related\n\n- [p-memoize](https://github.com/sindresorhus/p-memoize) - Memoize promise-returning & async functions\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-mem?utm_source=npm-mem&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n",
1887 "maintainers": [
1888 {
1889 "name": "sindresorhus",
1890 "email": "[email protected]"
1891 },
1892 {
1893 "name": "fregante",
1894 "email": "[email protected]"
1895 }
1896 ],
1897 "time": {
1898 "modified": "2020-10-10T16:25:56.714Z",
1899 "created": "2013-01-22T23:16:13.120Z",
1900 "0.0.1": "2013-01-22T23:16:15.354Z",
1901 "0.1.0": "2015-12-21T18:44:14.279Z",
1902 "0.1.1": "2016-02-02T15:53:17.433Z",
1903 "1.0.0": "2016-10-19T17:34:31.486Z",
1904 "1.1.0": "2016-10-19T18:05:26.119Z",
1905 "2.0.0": "2017-09-25T06:32:08.213Z",
1906 "3.0.0": "2017-10-11T15:56:14.080Z",
1907 "3.0.1": "2018-06-20T06:38:02.452Z",
1908 "4.0.0": "2018-08-27T17:33:38.386Z",
1909 "4.1.0": "2019-01-30T08:45:27.864Z",
1910 "4.2.0": "2019-03-12T17:41:47.237Z",
1911 "4.3.0": "2019-03-31T19:09:03.906Z",
1912 "5.0.0": "2019-05-17T17:25:34.041Z",
1913 "5.1.0": "2019-06-15T13:14:37.532Z",
1914 "5.1.1": "2019-06-29T20:05:51.216Z",
1915 "6.0.0": "2019-11-11T09:23:28.762Z",
1916 "6.0.1": "2019-11-29T13:29:37.074Z",
1917 "6.1.0": "2020-04-12T14:23:18.378Z",
1918 "6.1.1": "2020-08-29T21:55:55.811Z",
1919 "7.0.0-0": "2020-10-01T02:21:25.656Z",
1920 "7.0.0-1": "2020-10-01T02:48:25.698Z",
1921 "7.0.0-2": "2020-10-01T09:07:02.292Z",
1922 "7.0.0-3": "2020-10-06T06:25:52.072Z",
1923 "8.0.0": "2020-10-10T16:25:52.870Z"
1924 },
1925 "author": {
1926 "name": "Sindre Sorhus",
1927 "email": "[email protected]",
1928 "url": "https://sindresorhus.com"
1929 },
1930 "repository": {
1931 "type": "git",
1932 "url": "git+https://github.com/sindresorhus/mem.git"
1933 },
1934 "keywords": [
1935 "memoize",
1936 "function",
1937 "mem",
1938 "memoization",
1939 "cache",
1940 "caching",
1941 "optimize",
1942 "performance",
1943 "ttl",
1944 "expire",
1945 "promise"
1946 ],
1947 "readmeFilename": "readme.md",
1948 "homepage": "https://github.com/sindresorhus/mem#readme",
1949 "bugs": {
1950 "url": "https://github.com/sindresorhus/mem/issues"
1951 },
1952 "license": "MIT",
1953 "users": {
1954 "antixrist": true,
1955 "psychollama": true,
1956 "quocnguyen": true,
1957 "sasquatch": true,
1958 "joelwallis": true,
1959 "pldin601": true,
1960 "cr8tiv": true,
1961 "daniel-zahariev": true,
1962 "xch": true
1963 }
1964 }