{"_id":"p-memoize","_rev":"202621","name":"p-memoize","description":"Memoize promise-returning & async functions","dist-tags":{"latest":"7.1.1","version4":"4.0.4"},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"time":{"modified":"2023-03-21T06:29:42.000Z","created":"2016-10-21T09:40:27.332Z","7.1.1":"2022-10-07T09:16:24.370Z","7.1.0":"2022-07-05T21:08:51.436Z","7.0.0":"2022-07-03T13:15:10.294Z","6.0.2":"2022-06-11T10:29:13.152Z","4.0.3":"2021-11-14T16:29:36.280Z","4.0.4":"2022-01-03T16:31:04.665Z","6.0.1":"2021-10-16T08:29:15.497Z","6.0.0":"2021-10-13T09:48:42.590Z","5.0.1":"2021-10-05T12:51:26.657Z","5.0.0":"2021-09-19T08:13:04.391Z","4.0.2":"2021-09-17T13:36:35.234Z","4.0.1":"2020-09-24T12:12:05.234Z","4.0.0":"2020-02-17T16:30:44.983Z","4.0.0-0":"2019-11-29T11:20:30.403Z","4.0.0-1":"2019-11-29T13:55:38.725Z","3.1.0":"2019-04-05T21:36:40.956Z","3.0.0":"2019-03-13T05:14:21.811Z","2.1.0":"2018-09-01T11:15:54.488Z","2.0.0":"2018-05-25T19:01:28.498Z","1.0.0":"2016-10-21T09:40:27.332Z"},"users":{},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"versions":{"7.1.1":{"name":"p-memoize","version":"7.1.1","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && npm run build && tsd","build":"del-cli dist && tsc","prepack":"npm run build"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mimic-fn":"^4.0.0","type-fest":"^3.0.0"},"devDependencies":{"@sindresorhus/tsconfig":"^3.0.1","@types/serialize-javascript":"^5.0.2","ava":"^4.3.3","del-cli":"^5.0.0","delay":"^5.0.0","p-defer":"^4.0.0","p-state":"^1.0.0","serialize-javascript":"^6.0.0","ts-node":"^10.9.1","tsd":"^0.24.1","xo":"^0.52.4"},"ava":{"extensions":{"ts":"module"},"nodeArguments":["--loader=ts-node/esm"]},"xo":{"rules":{"@typescript-eslint/no-redundant-type-constituents":"off"}},"gitHead":"52fe6052ff2287f528c954c4c67fc5a61ff21360","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@7.1.1","_nodeVersion":"14.19.3","_npmVersion":"8.3.2","dist":{"shasum":"53b1d0e6007288f7261cfa11a7603b84c9261bfa","size":4947,"noattachment":false,"key":"/p-memoize/-/p-memoize-7.1.1.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-7.1.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_7.1.1_1665134184240_0.729020117401844"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-10-07T09:16:30.721Z","publish_time":1665134184370,"_cnpm_publish_time":1665134184370},"7.1.0":{"name":"p-memoize","version":"7.1.0","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && npm run build && tsd","build":"del-cli dist && tsc","prepack":"npm run build"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mimic-fn":"^4.0.0"},"devDependencies":{"@sindresorhus/tsconfig":"^3.0.1","@types/serialize-javascript":"^5.0.2","ava":"^4.3.0","del-cli":"^4.0.1","delay":"^5.0.0","p-defer":"^4.0.0","p-state":"^1.0.0","serialize-javascript":"^6.0.0","ts-node":"^10.8.2","tsd":"^0.22.0","xo":"^0.50.0"},"ava":{"extensions":{"ts":"module"},"nodeArguments":["--loader=ts-node/esm"]},"xo":{"rules":{"@typescript-eslint/no-redundant-type-constituents":"off"}},"gitHead":"f1f01c06ca24cd6a448c1ecd96461015a87397ff","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@7.1.0","_nodeVersion":"14.19.3","_npmVersion":"8.3.2","dist":{"shasum":"6862c674faf66d0a8cd55d7bcf6f6d3ebd3dd7ea","size":4965,"noattachment":false,"key":"/p-memoize/-/p-memoize-7.1.0.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-7.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_7.1.0_1657055331267_0.7482470088520039"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-07-05T21:09:42.680Z","publish_time":1657055331436,"_cnpm_publish_time":1657055331436},"7.0.0":{"name":"p-memoize","version":"7.0.0","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && npm run build && tsd","build":"del-cli dist && tsc","prepack":"npm run build"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mimic-fn":"^4.0.0"},"devDependencies":{"@sindresorhus/tsconfig":"^3.0.1","@types/serialize-javascript":"^5.0.2","ava":"^4.3.0","del-cli":"^4.0.1","delay":"^5.0.0","p-defer":"^4.0.0","p-state":"^1.0.0","serialize-javascript":"^6.0.0","ts-node":"^10.8.2","tsd":"^0.22.0","xo":"^0.50.0"},"ava":{"extensions":{"ts":"module"},"nodeArguments":["--loader=ts-node/esm"]},"xo":{"rules":{"@typescript-eslint/no-redundant-type-constituents":"off"}},"gitHead":"f469c0616864258c7e31fc3636e0f222340a1ada","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@7.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.3.2","dist":{"shasum":"11d4086043ae97829d9e19107a838c9e658a38bd","size":4878,"noattachment":false,"key":"/p-memoize/-/p-memoize-7.0.0.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-7.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_7.0.0_1656854110103_0.4866543888162085"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-07-03T14:57:53.564Z","publish_time":1656854110294,"_cnpm_publish_time":1656854110294},"6.0.2":{"name":"p-memoize","version":"6.0.2","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.20"},"scripts":{"test":"xo && ava && npm run build && tsd","build":"del-cli dist && tsc","prepack":"npm run build"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mimic-fn":"^4.0.0"},"devDependencies":{"@sindresorhus/tsconfig":"^2.0.0","@types/serialize-javascript":"^5.0.1","ava":"^3.15.0","del-cli":"^4.0.1","delay":"^5.0.0","serialize-javascript":"^6.0.0","ts-node":"^10.3.0","tsd":"^0.18.0","typescript":"^4.4.4","xo":"^0.44.0"},"ava":{"extensions":{"ts":"module"},"nonSemVerExperiments":{"configurableModuleFormat":true},"nodeArguments":["--loader=ts-node/esm"]},"gitHead":"c6876e097d8f0a577f27a9f8e9dca3b1926fbbfd","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@6.0.2","_nodeVersion":"14.19.2","_npmVersion":"8.3.2","dist":{"shasum":"d760f3687804cdc78ae96d90bc264df1d8a578d9","size":4890,"noattachment":false,"key":"/p-memoize/-/p-memoize-6.0.2.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-6.0.2.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_6.0.2_1654943353033_0.33835136494618934"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-06-11T11:57:32.713Z","publish_time":1654943353152,"_cnpm_publish_time":1654943353152},"4.0.3":{"name":"p-memoize","version":"4.0.3","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"map-age-cleaner":"^0.1.3","mimic-fn":"^3.0.0","p-settle":"^4.1.1"},"devDependencies":{"ava":"^1.4.1","delay":"^5.0.0","tsd":"^0.11.0","xo":"^0.26.1"},"types":"./index.d.ts","readmeFilename":"readme.md","gitHead":"7b4fe18ae7d2abac411e520d3ee74de320e903aa","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@4.0.3","_nodeVersion":"12.22.1","_npmVersion":"8.1.1","dist":{"shasum":"9f3b9965f1fd79dadc2e6ec957c1b43c410a6f99","size":3719,"noattachment":false,"key":"/p-memoize/-/p-memoize-4.0.3.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-4.0.3.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_4.0.3_1636907376148_0.5108385651917544"},"_hasShrinkwrap":false,"publish_time":1636907376280,"_cnpm_publish_time":1636907376280,"_cnpmcore_publish_time":"2021-12-16T13:39:20.393Z"},"4.0.4":{"name":"p-memoize","version":"4.0.4","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"map-age-cleaner":"^0.1.3","mimic-fn":"^3.0.0","p-settle":"^4.1.1"},"devDependencies":{"ava":"^1.4.1","delay":"^5.0.0","tsd":"^0.11.0","xo":"^0.26.1"},"types":"./index.d.ts","readmeFilename":"readme.md","gitHead":"4c89cf794225070cbd6a6a975332cc658b0c8de5","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@4.0.4","_nodeVersion":"12.22.1","_npmVersion":"8.1.1","dist":{"shasum":"90a4c4668866737fc5c8364c56b06f6ca44afb15","size":3757,"noattachment":false,"key":"/p-memoize/-/p-memoize-4.0.4.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-4.0.4.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_4.0.4_1641227464475_0.7660348470850253"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-01-03T16:31:13.633Z","publish_time":1641227464665,"_cnpm_publish_time":1641227464665},"6.0.1":{"name":"p-memoize","version":"6.0.1","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.20"},"scripts":{"test":"xo && ava && npm run build && tsd","build":"del-cli dist && tsc","prepack":"npm run build"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mimic-fn":"^4.0.0"},"devDependencies":{"@sindresorhus/tsconfig":"^2.0.0","@types/serialize-javascript":"^5.0.1","ava":"^3.15.0","del-cli":"^4.0.1","delay":"^5.0.0","serialize-javascript":"^6.0.0","ts-node":"^10.3.0","tsd":"^0.18.0","typescript":"^4.4.4","xo":"^0.44.0"},"ava":{"extensions":{"ts":"module"},"nonSemVerExperiments":{"configurableModuleFormat":true},"nodeArguments":["--loader=ts-node/esm"]},"gitHead":"e8574a1047910e8940ce8d7fa6bea4cf18bc4567","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@6.0.1","_nodeVersion":"12.22.1","_npmVersion":"7.20.3","dist":{"shasum":"786410dcc98d70e1e15cb81de6b38eaad8826e8e","size":4899,"noattachment":false,"key":"/p-memoize/-/p-memoize-6.0.1.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-6.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_6.0.1_1634372955356_0.7700795796785855"},"_hasShrinkwrap":false,"publish_time":1634372955497,"_cnpm_publish_time":1634372955497,"_cnpmcore_publish_time":"2021-12-16T13:39:20.591Z"},"6.0.0":{"name":"p-memoize","version":"6.0.0","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./dist/index.js","types":"dist/index.d.ts","engines":{"node":">=12.20"},"scripts":{"test":"xo && ava && npm run build && tsd","build":"del-cli dist && tsc","prepack":"npm run build"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mimic-fn":"^4.0.0"},"devDependencies":{"@sindresorhus/tsconfig":"^2.0.0","@types/serialize-javascript":"^5.0.1","ava":"^3.15.0","del-cli":"^4.0.1","delay":"^5.0.0","serialize-javascript":"^6.0.0","ts-node":"^10.3.0","tsd":"^0.18.0","typescript":"^4.4.4","xo":"^0.44.0"},"ava":{"extensions":{"ts":"module"},"nonSemVerExperiments":{"configurableModuleFormat":true},"nodeArguments":["--loader=ts-node/esm"]},"gitHead":"8fe652de32ed47c142a5bc806798ff3b6e68855e","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@6.0.0","_nodeVersion":"14.17.5","_npmVersion":"7.20.3","dist":{"shasum":"db4c525c1141f3cf75b6a483cd6f7c31947ac4f5","size":4877,"noattachment":false,"key":"/p-memoize/-/p-memoize-6.0.0.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-6.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_6.0.0_1634118522424_0.30232592275999703"},"_hasShrinkwrap":false,"publish_time":1634118522590,"_cnpm_publish_time":1634118522590,"_cnpmcore_publish_time":"2021-12-16T13:39:20.849Z"},"5.0.1":{"name":"p-memoize","version":"5.0.1","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"map-age-cleaner":"^0.2.0","mimic-fn":"^4.0.0"},"devDependencies":{"ava":"^3.15.0","delay":"^5.0.0","tsd":"^0.17.0","typescript":"^4.4.3","xo":"^0.44.0"},"gitHead":"c5dc424105cb31212575c464e3d5d9b0e95593ab","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@5.0.1","_nodeVersion":"16.10.0","_npmVersion":"7.20.3","dist":{"shasum":"302ffb5822374ed9571af11236ecbe82c31e2473","size":3646,"noattachment":false,"key":"/p-memoize/-/p-memoize-5.0.1.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-5.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_5.0.1_1633438286490_0.46147589694142255"},"_hasShrinkwrap":false,"publish_time":1633438286657,"_cnpm_publish_time":1633438286657,"_cnpmcore_publish_time":"2021-12-16T13:39:21.149Z"},"5.0.0":{"name":"p-memoize","version":"5.0.0","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"map-age-cleaner":"^0.2.0","mimic-fn":"^4.0.0"},"devDependencies":{"ava":"^3.15.0","delay":"^5.0.0","tsd":"^0.17.0","typescript":"^4.4.3","xo":"^0.44.0"},"gitHead":"2b34e02f9e3ffd942b6a4f133c18d9ce235c52f0","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@5.0.0","_nodeVersion":"12.22.1","_npmVersion":"7.20.3","dist":{"shasum":"aa0fa975f2a73fce93c25ca1a1de29bb8e3370d7","size":3631,"noattachment":false,"key":"/p-memoize/-/p-memoize-5.0.0.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_5.0.0_1632039184271_0.7900500701072835"},"_hasShrinkwrap":false,"publish_time":1632039184391,"_cnpm_publish_time":1632039184391,"_cnpmcore_publish_time":"2021-12-16T13:39:21.349Z"},"4.0.2":{"name":"p-memoize","version":"4.0.2","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"map-age-cleaner":"^0.1.3","mimic-fn":"^3.0.0"},"devDependencies":{"ava":"^1.4.1","delay":"^5.0.0","tsd":"^0.11.0","xo":"^0.26.1"},"gitHead":"f409988445dfe7aea88b2f946a2a08d1fa167960","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@4.0.2","_nodeVersion":"14.17.5","_npmVersion":"7.20.3","dist":{"shasum":"d9c84056a2efbdf4055f83547435e9af49aebb6a","size":3702,"noattachment":false,"key":"/p-memoize/-/p-memoize-4.0.2.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-4.0.2.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_4.0.2_1631885795070_0.6627377326666566"},"_hasShrinkwrap":false,"publish_time":1631885795234,"deprecated":"4.0.2 has a bug which causes cache misses. Stay on 4.0.1 or upgrade to 5.0.0.","_cnpm_publish_time":1631885795234,"_cnpmcore_publish_time":"2021-12-16T13:39:21.567Z"},"4.0.1":{"name":"p-memoize","version":"4.0.1","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mem":"^6.0.1","mimic-fn":"^3.0.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.11.0","xo":"^0.26.1"},"gitHead":"a474b539356dbd7b38d18f347bf439e9b66e7cd6","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@4.0.1","_nodeVersion":"14.11.0","_npmVersion":"6.14.8","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"6f4231857fec10de2504611fe820c808fa8c5f8b","size":2743,"noattachment":false,"key":"/p-memoize/-/p-memoize-4.0.1.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-4.0.1.tgz"},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_4.0.1_1600949525028_0.3332288104043384"},"_hasShrinkwrap":false,"publish_time":1600949525234,"_cnpm_publish_time":1600949525234,"_cnpmcore_publish_time":"2021-12-16T13:39:21.822Z"},"4.0.0":{"name":"p-memoize","version":"4.0.0","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"funding":"https://github.com/sindresorhus/p-memoize?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mem":"^6.0.1","mimic-fn":"^3.0.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.11.0","xo":"^0.26.1"},"gitHead":"19fab6101ffc7c7d718b94c64f57cf6e8ef7d844","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@4.0.0","_nodeVersion":"10.18.1","_npmVersion":"6.13.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"1f955b6c38aaa4b74d243e354eae51a7ecb48e94","size":2588,"noattachment":false,"key":"/p-memoize/-/p-memoize-4.0.0.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-4.0.0.tgz"},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_4.0.0_1581957044836_0.5621187995125203"},"_hasShrinkwrap":false,"publish_time":1581957044983,"_cnpm_publish_time":1581957044983,"_cnpmcore_publish_time":"2021-12-16T13:39:22.081Z"},"4.0.0-0":{"name":"p-memoize","version":"4.0.0-0","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"map-age-cleaner":"^0.1.3","mimic-fn":"^2.1.0"},"devDependencies":{"ava":"^1.4.1","delay":"^4.1.0","serialize-javascript":"^1.7.0","tsd":"^0.7.3","xo":"^0.24.0"},"readmeFilename":"readme.md","gitHead":"70045e070168cf66bac0c177add80f08bc0a5dec","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@4.0.0-0","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"shasum":"b8ced0f20c7f1be7ebf705925fce5046d9a5628a","size":3766,"noattachment":false,"key":"/p-memoize/-/p-memoize-4.0.0-0.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-4.0.0-0.tgz"},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmUser":{"name":"bfred-it","email":"npm@bfred.it"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_4.0.0-0_1575026430306_0.5526330509772726"},"_hasShrinkwrap":false,"publish_time":1575026430403,"_cnpm_publish_time":1575026430403,"_cnpmcore_publish_time":"2021-12-16T13:39:22.796Z"},"4.0.0-1":{"name":"p-memoize","version":"4.0.0-1","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"map-age-cleaner":"^0.1.3","mimic-fn":"^2.1.0"},"devDependencies":{"ava":"^1.4.1","delay":"^4.1.0","serialize-javascript":"^1.7.0","tsd":"^0.7.3","xo":"^0.24.0"},"readmeFilename":"readme.md","gitHead":"0a3b596bf9befb3caf0c86af8962675d5021c6ca","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@4.0.0-1","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"shasum":"9b16a14552c732af0f93bf3d99bc104e289d767b","size":3770,"noattachment":false,"key":"/p-memoize/-/p-memoize-4.0.0-1.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-4.0.0-1.tgz"},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmUser":{"name":"bfred-it","email":"npm@bfred.it"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_4.0.0-1_1575035738605_0.8694879039373606"},"_hasShrinkwrap":false,"publish_time":1575035738725,"_cnpm_publish_time":1575035738725,"_cnpmcore_publish_time":"2021-12-16T13:39:22.501Z"},"3.1.0":{"name":"p-memoize","version":"3.1.0","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mem":"^4.3.0","mimic-fn":"^2.1.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"0c0e11c95d5459da5f99012f2c43847a2cbdb3bc","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@3.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"ac7587983c9e530139f969ca7b41ef40e93659aa","size":2439,"noattachment":false,"key":"/p-memoize/-/p-memoize-3.1.0.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-3.1.0.tgz"},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_3.1.0_1554500200784_0.7369554966788057"},"_hasShrinkwrap":false,"publish_time":1554500200956,"_cnpm_publish_time":1554500200956,"_cnpmcore_publish_time":"2021-12-16T13:39:23.034Z"},"3.0.0":{"name":"p-memoize","version":"3.0.0","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd-check"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mem":"^4.2.0","mimic-fn":"^2.0.0"},"devDependencies":{"ava":"^1.3.1","tsd-check":"^0.3.0","xo":"^0.24.0"},"gitHead":"7190ce6314e42613895043949ae9c27c2706b2e2","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@3.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"1f417db6b60ad00602efd8d8c56e6b3add4b1af0","size":2292,"noattachment":false,"key":"/p-memoize/-/p-memoize-3.0.0.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-3.0.0.tgz"},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_3.0.0_1552454061691_0.7032725175452252"},"_hasShrinkwrap":false,"publish_time":1552454061811,"_cnpm_publish_time":1552454061811,"_cnpmcore_publish_time":"2021-12-16T13:39:23.286Z"},"2.1.0":{"name":"p-memoize","version":"2.1.0","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mem":"^4.0.0","mimic-fn":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"194dccddce7da13b318970e1971f96b3f295e53f","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@2.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"9ac80c8cf9373c52dfece6aae1fd2e300602898a","size":1920,"noattachment":false,"key":"/p-memoize/-/p-memoize-2.1.0.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-2.1.0.tgz"},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_2.1.0_1535800554319_0.008474239542199724"},"_hasShrinkwrap":false,"publish_time":1535800554488,"_cnpm_publish_time":1535800554488,"_cnpmcore_publish_time":"2021-12-16T13:39:23.512Z"},"2.0.0":{"name":"p-memoize","version":"2.0.0","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mem":"^3.0.0","mimic-fn":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"6815f36dba8b27f70732258a55df078ed6546a9e","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"ad8e4a509c5a769d92b4a9faa4b066905384a48c","size":1915,"noattachment":false,"key":"/p-memoize/-/p-memoize-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-2.0.0.tgz"},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-memoize_2.0.0_1527274888355_0.5029673012310507"},"_hasShrinkwrap":false,"publish_time":1527274888498,"_cnpm_publish_time":1527274888498,"_cnpmcore_publish_time":"2021-12-16T13:39:23.772Z"},"1.0.0":{"name":"p-memoize","version":"1.0.0","description":"Memoize promise-returning & async functions","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-memoize.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","memoize","mem","memoization","function","cache","caching","optimize","performance","ttl","expire","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"mem":"^1.1.0","mimic-fn":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"c10452354baefee845252b0ba2cc803f4356f7d4","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"homepage":"https://github.com/sindresorhus/p-memoize#readme","_id":"p-memoize@1.0.0","_shasum":"5760138734a553d1b103e4c176cf8866faa5f26e","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"5760138734a553d1b103e4c176cf8866faa5f26e","size":1884,"noattachment":false,"key":"/p-memoize/-/p-memoize-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/p-memoize/download/p-memoize-1.0.0.tgz"},"maintainers":[{"name":"fregante","email":""},{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/p-memoize-1.0.0.tgz_1477042825174_0.8655889271758497"},"directories":{},"publish_time":1477042827332,"_hasShrinkwrap":false,"_cnpm_publish_time":1477042827332,"_cnpmcore_publish_time":"2021-12-16T13:39:24.626Z"}},"readme":"# p-memoize\n\n> [Memoize](https://en.wikipedia.org/wiki/Memoization) promise-returning & async functions\n\nUseful for speeding up consecutive function calls by caching the result of calls with identical input.\n\n<!-- Please keep this section in sync with https://github.com/sindresorhus/mem/blob/main/readme.md -->\n\nBy default, **only the memoized function's first argument is considered** via strict equality comparison. If you need to cache multiple arguments or cache `object`s *by value*, have a look at alternative [caching strategies](#caching-strategy) below.\n\nThis package is similar to [mem](https://github.com/sindresorhus/mem) but with async-specific enhancements; in particular, it allows for asynchronous caches and does not cache rejected promises.\n\n## Install\n\n```sh\nnpm install p-memoize\n```\n\n## Usage\n\n```js\nimport pMemoize from 'p-memoize';\nimport got from 'got';\n\nconst memoizedGot = pMemoize(got);\n\nawait memoizedGot('https://sindresorhus.com');\n\n// This call is cached\nawait memoizedGot('https://sindresorhus.com');\n```\n\n### Caching strategy\n\nSimilar to the [caching strategy for `mem`](https://github.com/sindresorhus/mem#options) with the following exceptions:\n\n- Promises returned from a memoized function are locally cached until resolving, when their value is added to `cache`. Special properties assigned to a returned promise will not be kept after resolution and every promise may need to resolve with a serializable object if caching results in a database.\n- `.get()`, `.has()` and `.set()` methods on `cache` can run asynchronously by returning a promise.\n- Instead of `.set()` being provided an object with the properties `value` and `maxAge`, it will only be provided `value` as the first argument. If you want to implement time-based expiry, consider [doing so in `cache`](#time-based-cache-expiration).\n\n## API\n\n### pMemoize(fn, options?)\n\nReturns a memoized version of the given function.\n\n#### fn\n\nType: `Function`\n\nPromise-returning or async function to be memoized.\n\n#### options\n\nType: `object`\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\nSee the [caching strategy](#caching-strategy) section for more information.\n\n##### cache\n\nType: `object | false`\\\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. To disable caching so that only concurrent executions resolve with the same value, pass `false`.\n\nSee the [caching strategy](https://github.com/sindresorhus/mem#caching-strategy) section in the `mem` package for more information.\n\n### pMemoizeDecorator(options)\n\nReturns a [decorator](https://github.com/tc39/proposal-decorators) to memoize class methods or static class methods.\n\nNotes:\n\n- Only class methods and getters/setters can be memoized, not regular functions (they aren't part of the proposal);\n- Only [TypeScript’s decorators](https://www.typescriptlang.org/docs/handbook/decorators.html#parameter-decorators) are supported, not [Babel’s](https://babeljs.io/docs/en/babel-plugin-proposal-decorators), which use a different version of the proposal;\n- Being an experimental feature, they need to be enabled with `--experimentalDecorators`; follow TypeScript’s docs.\n\n#### options\n\nType: `object`\n\nSame as options for `pMemoize()`.\n\n```ts\nimport {pMemoizeDecorator} from 'p-memoize';\n\nclass Example {\n\tindex = 0\n\n\t@pMemoizeDecorator()\n\tasync counter() {\n\t\treturn ++this.index;\n\t}\n}\n\nclass ExampleWithOptions {\n\tindex = 0\n\n\t@pMemoizeDecorator()\n\tasync counter() {\n\t\treturn ++this.index;\n\t}\n}\n```\n\n### pMemoizeClear(memoized)\n\nClear all cached data of a memoized function.\n\nIt will throw when given a non-memoized function.\n\n## Tips\n\n### Time-based cache expiration\n\n```js\nimport pMemoize from 'p-memoize';\nimport ExpiryMap from 'expiry-map';\nimport got from 'got';\n\nconst cache = new ExpiryMap(10000); // Cached values expire after 10 seconds\n\nconst memoizedGot = pMemoize(got, {cache});\n```\n\n### Caching promise rejections\n\n```js\nimport pMemoize from 'p-memoize';\nimport pReflect from 'p-reflect';\n\nconst memoizedGot = pMemoize(async (url, options) => pReflect(got(url, options)));\n\nawait memoizedGot('https://example.com');\n// {isFulfilled: true, isRejected: false, value: '...'}\n```\n\n## Related\n\n- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions\n- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions\n- [More…](https://github.com/sindresorhus/promise-fun)\n","_attachments":{},"homepage":"https://github.com/sindresorhus/p-memoize#readme","bugs":{"url":"https://github.com/sindresorhus/p-memoize/issues"},"license":"MIT"}