{"_id":"typescript-memoize","_rev":"3513467","name":"typescript-memoize","description":"Memoize decorator for Typescript","dist-tags":{"latest":"1.1.1"},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"time":{"modified":"2024-08-27T20:33:21.000Z","created":"2016-12-09T17:03:49.641Z","1.1.1":"2022-09-15T16:20:48.444Z","1.1.0":"2021-11-18T19:28:09.244Z","1.0.1":"2021-04-01T11:29:02.900Z","1.0.0":"2021-02-20T00:14:18.904Z","1.0.0-alpha.4":"2020-11-20T14:47:36.992Z","1.0.0-alpha.3":"2017-07-30T00:25:15.677Z","1.0.0-alpha.2":"2017-07-29T22:55:56.038Z","1.0.0-alpha.1":"2017-07-29T19:49:58.711Z","0.0.4":"2017-05-24T16:39:25.500Z","0.0.3":"2016-12-09T17:22:35.340Z","0.0.2":"2016-12-09T17:16:09.079Z","0.0.1":"2016-12-09T17:03:49.641Z"},"users":{},"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"versions":{"1.1.1":{"name":"typescript-memoize","version":"1.1.1","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","module":"./dist/es2015/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","scripts":{"test":"karma start test/karma.config.js --single-run","prepublish":"npm run build && npm run build:es2015","clean":"rm -rf ./dist","build":"tsc","build:es2015":"tsc --module es2015 --target es2015 --outDir dist/es2015","tslint":"tslint --project .","eslint":"npm run tslint"},"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","devDependencies":{"@types/jasmine":"3.6.2","@types/node":"14.14.9","awesome-typescript-loader":"5.2.1","es6-shim":"0.35.6","jasmine-core":"3.6.0","karma":"6.3.16","karma-chrome-launcher":"3.1.0","karma-es6-shim":"1.0.0","karma-jasmine":"4.0.1","karma-jasmine-html-reporter":"1.5.4","karma-junit-reporter":"2.0.1","karma-sourcemap-loader":"0.3.8","karma-spec-reporter":"0.0.32","karma-threshold-reporter":"0.1.15","karma-typescript":"5.2.0","source-map-loader":"1.1.2","tslib":"2.0.3","tslint":"6.1.3","typescript":"4.1.2"},"gitHead":"59711602aad22327edcf038f862c2acf1e6e1f83","_id":"typescript-memoize@1.1.1","_nodeVersion":"14.18.2","_npmVersion":"6.14.15","dist":{"shasum":"02737495d5df6ebf72c07ba0d002e8f4cf5ccfa0","size":7007,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-1.1.1.tgz"},"_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"directories":{},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-memoize_1.1.1_1663258848241_0.10586719051379156"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-15T16:34:56.556Z","publish_time":1663258848444,"_cnpm_publish_time":1663258848444},"1.1.0":{"name":"typescript-memoize","version":"1.1.0","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","module":"./dist/es2015/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","scripts":{"test":"karma start test/karma.config.js --single-run","prepublish":"npm run build && npm run build:es2015","clean":"rm -rf ./dist","build":"tsc","build:es2015":"tsc --module es2015 --target es2015 --outDir dist/es2015","tslint":"tslint --project .","eslint":"npm run tslint"},"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","devDependencies":{"@types/jasmine":"3.6.2","@types/node":"14.14.9","awesome-typescript-loader":"5.2.1","es6-shim":"0.35.6","jasmine-core":"3.6.0","karma":"5.2.3","karma-chrome-launcher":"3.1.0","karma-es6-shim":"1.0.0","karma-jasmine":"4.0.1","karma-jasmine-html-reporter":"1.5.4","karma-junit-reporter":"2.0.1","karma-sourcemap-loader":"0.3.8","karma-spec-reporter":"0.0.32","karma-threshold-reporter":"0.1.15","karma-typescript":"5.2.0","source-map-loader":"1.1.2","tslib":"2.0.3","tslint":"6.1.3","typescript":"4.1.2"},"gitHead":"8d810cc0c88a54114f411c6cee2f8b5b8994bdc9","_id":"typescript-memoize@1.1.0","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"shasum":"4a8f512d06fc995167c703a3592219901db8bc79","size":6994,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-1.1.0.tgz"},"_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"directories":{},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-memoize_1.1.0_1637263689029_0.4997300804823144"},"_hasShrinkwrap":false,"publish_time":1637263689244,"_cnpm_publish_time":1637263689244,"_cnpmcore_publish_time":"2021-12-16T17:19:10.093Z"},"1.0.1":{"name":"typescript-memoize","version":"1.0.1","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","module":"./dist/es2015/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","scripts":{"test":"karma start test/karma.config.js --single-run","prepublish":"npm run build && npm run build:es2015","clean":"rm -rf ./dist","build":"tsc","build:es2015":"tsc --module es2015 --target es2015 --outDir dist/es2015","tslint":"tslint --project .","eslint":"npm run tslint"},"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","devDependencies":{"@types/jasmine":"3.6.2","@types/node":"14.14.9","awesome-typescript-loader":"5.2.1","es6-shim":"0.35.6","jasmine-core":"3.6.0","karma":"5.2.3","karma-chrome-launcher":"3.1.0","karma-es6-shim":"1.0.0","karma-jasmine":"4.0.1","karma-jasmine-html-reporter":"1.5.4","karma-junit-reporter":"2.0.1","karma-sourcemap-loader":"0.3.8","karma-spec-reporter":"0.0.32","karma-threshold-reporter":"0.1.15","karma-typescript":"5.2.0","source-map-loader":"1.1.2","tslib":"2.0.3","tslint":"6.1.3","typescript":"4.1.2"},"gitHead":"6c215d5fe37e2149c0463cfee6a7b5ad908951bd","_id":"typescript-memoize@1.0.1","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"shasum":"0a8199aa28f6fe18517f6e9308ef7bfbe9a98d59","size":5594,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-1.0.1.tgz"},"_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"directories":{},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-memoize_1.0.1_1617276542749_0.7207565659689841"},"_hasShrinkwrap":false,"publish_time":1617276542900,"_cnpm_publish_time":1617276542900,"_cnpmcore_publish_time":"2021-12-16T17:19:10.396Z"},"1.0.0":{"name":"typescript-memoize","version":"1.0.0","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","module":"./dist/es2015/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","scripts":{"test":"karma start test/karma.config.js --single-run","prepublish":"npm run build && npm run build:es2015","clean":"rm -rf ./dist","build":"tsc","build:es2015":"tsc --module es2015 --target es2015 --outDir dist/es2015","tslint":"tslint --project .","eslint":"npm run tslint"},"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","devDependencies":{"@types/jasmine":"3.6.2","@types/node":"14.14.9","awesome-typescript-loader":"5.2.1","es6-shim":"0.35.6","jasmine-core":"3.6.0","karma":"5.2.3","karma-chrome-launcher":"3.1.0","karma-es6-shim":"1.0.0","karma-jasmine":"4.0.1","karma-jasmine-html-reporter":"1.5.4","karma-junit-reporter":"2.0.1","karma-sourcemap-loader":"0.3.8","karma-spec-reporter":"0.0.32","karma-threshold-reporter":"0.1.15","karma-typescript":"5.2.0","source-map-loader":"1.1.2","tslib":"2.0.3","tslint":"6.1.3","typescript":"4.1.2"},"gitHead":"f788d6932aa9d9cc21e6df8aba5a60a015df5ed2","_id":"typescript-memoize@1.0.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"shasum":"ad3b0e7e5a411ca234be123f913a2a31302b7eb6","size":5593,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-1.0.0.tgz"},"_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"directories":{},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-memoize_1.0.0_1613780058735_0.6602475077197625"},"_hasShrinkwrap":false,"publish_time":1613780058904,"_cnpm_publish_time":1613780058904,"_cnpmcore_publish_time":"2021-12-16T17:19:10.646Z"},"1.0.0-alpha.4":{"name":"typescript-memoize","version":"1.0.0-alpha.4","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","module":"./dist/es2015/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","scripts":{"test":"karma start test/karma.config.js --single-run","prepublish":"npm run build && npm run build:es2015","clean":"rm -rf ./dist","build":"tsc","build:es2015":"tsc --module es2015 --target es2015 --outDir dist/es2015","tslint":"tslint --project .","eslint":"npm run tslint"},"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","devDependencies":{"@types/jasmine":"3.6.2","@types/node":"14.14.9","awesome-typescript-loader":"5.2.1","es6-shim":"0.35.6","jasmine-core":"3.6.0","karma":"5.2.3","karma-chrome-launcher":"3.1.0","karma-es6-shim":"1.0.0","karma-jasmine":"4.0.1","karma-jasmine-html-reporter":"1.5.4","karma-junit-reporter":"2.0.1","karma-sourcemap-loader":"0.3.8","karma-spec-reporter":"0.0.32","karma-threshold-reporter":"0.1.15","karma-typescript":"5.2.0","source-map-loader":"1.1.2","tslib":"2.0.3","tslint":"6.1.3","typescript":"4.1.2"},"gitHead":"d9629dbcac7a10bd5586463018aa9d520ed541bf","_id":"typescript-memoize@1.0.0-alpha.4","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"shasum":"fd97ab63807c3392af5d0ac5f4754254a4fcd634","size":4908,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-1.0.0-alpha.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-1.0.0-alpha.4.tgz"},"_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"directories":{},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-memoize_1.0.0-alpha.4_1605883656848_0.46404540592520926"},"_hasShrinkwrap":false,"publish_time":1605883656992,"_cnpm_publish_time":1605883656992,"_cnpmcore_publish_time":"2021-12-16T17:19:10.867Z"},"1.0.0-alpha.3":{"name":"typescript-memoize","version":"1.0.0-alpha.3","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","scripts":{"test":"karma start test/karma.config.js --single-run","prepublish":"npm run build","clean":"rm -rf ./dist","build":"tsc"},"files":["dist","src"],"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","dependencies":{"core-js":"2.4.1"},"devDependencies":{"@types/core-js":"0.9.42","@types/jasmine":"2.5.53","@types/node":"8.0.17","awesome-typescript-loader":"3.2.2","es6-shim":"0.35.3","jasmine-core":"2.7.0","karma":"1.7.0","karma-chrome-launcher":"2.2.0","karma-es6-shim":"1.0.0","karma-jasmine":"1.1.0","karma-jasmine-html-reporter":"0.2.2","karma-junit-reporter":"1.2.0","karma-typescript":"3.0.4","karma-phantomjs-launcher":"1.0.4","karma-sourcemap-loader":"0.3.7","karma-spec-reporter":"0.0.31","karma-threshold-reporter":"0.1.15","source-map-loader":"0.2.1","tslib":"1.7.1","typescript":"2.4.2"},"gitHead":"e5882097397130f7d87bc452351845166922594a","_id":"typescript-memoize@1.0.0-alpha.3","_shasum":"699a5415f886694a8d6e2e5451bc28a39a6bc2f9","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"dist":{"shasum":"699a5415f886694a8d6e2e5451bc28a39a6bc2f9","size":2562,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-1.0.0-alpha.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-1.0.0-alpha.3.tgz"},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-memoize-1.0.0-alpha.3.tgz_1501374315552_0.6805705295410007"},"directories":{},"publish_time":1501374315677,"_hasShrinkwrap":false,"_cnpm_publish_time":1501374315677,"_cnpmcore_publish_time":"2021-12-16T17:19:11.075Z"},"1.0.0-alpha.2":{"name":"typescript-memoize","version":"1.0.0-alpha.2","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","scripts":{"test":"karma start test/karma.config.js --single-run","prepublish":"npm run build","clean":"rm -rf ./dist","build":"tsc"},"files":["dist","src"],"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","dependencies":{"core-js":"2.4.1"},"devDependencies":{"@types/core-js":"0.9.42","@types/jasmine":"2.5.53","@types/node":"8.0.17","awesome-typescript-loader":"3.0.0-beta.9","es6-shim":"0.35.3","jasmine-core":"2.4.1","karma":"1.5.0","karma-chrome-launcher":"2.0.0","karma-es6-shim":"1.0.0","karma-jasmine":"1.1.0","karma-jasmine-html-reporter":"0.2.2","karma-junit-reporter":"1.2.0","karma-typescript":"2.1.7","karma-phantomjs-launcher":"1.0.2","karma-sourcemap-loader":"0.3.7","karma-spec-reporter":"0.0.26","karma-threshold-reporter":"0.1.15","source-map-loader":"0.1.5","tslib":"1.7.1","typescript":"2.1.5"},"gitHead":"b12b9614b111dc4f01e0c4f888986ce491a81fd5","_id":"typescript-memoize@1.0.0-alpha.2","_shasum":"451992f495d2d971c88c3588bad1be3302136b7b","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"dist":{"shasum":"451992f495d2d971c88c3588bad1be3302136b7b","size":2544,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-1.0.0-alpha.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-1.0.0-alpha.2.tgz"},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-memoize-1.0.0-alpha.2.tgz_1501368955958_0.20629481482319534"},"directories":{},"publish_time":1501368956038,"_hasShrinkwrap":false,"_cnpm_publish_time":1501368956038,"_cnpmcore_publish_time":"2021-12-16T17:19:11.288Z"},"1.0.0-alpha.1":{"name":"typescript-memoize","version":"1.0.0-alpha.1","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","scripts":{"test":"karma start test/karma.config.js --single-run","prepublish":"npm run build","clean":"rm -rf ./dist","build":"tsc"},"files":["dist","src"],"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","dependencies":{"core-js":"2.4.1"},"devDependencies":{"@types/core-js":"0.9.42","@types/jasmine":"2.5.53","@types/node":"8.0.17","awesome-typescript-loader":"3.0.0-beta.9","es6-shim":"0.35.3","jasmine-core":"2.4.1","karma":"1.5.0","karma-chrome-launcher":"2.0.0","karma-es6-shim":"1.0.0","karma-jasmine":"1.1.0","karma-jasmine-html-reporter":"0.2.2","karma-junit-reporter":"1.2.0","karma-typescript":"2.1.7","karma-phantomjs-launcher":"1.0.2","karma-sourcemap-loader":"0.3.7","karma-spec-reporter":"0.0.26","karma-threshold-reporter":"0.1.15","source-map-loader":"0.1.5","tslib":"1.7.1","typescript":"2.1.5"},"gitHead":"d8b3e3ca4e84a705a1fa628624577e07923495b6","_id":"typescript-memoize@1.0.0-alpha.1","_shasum":"c064b378e76f0ab66906a75990b4d7ffcd0e99ed","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"dist":{"shasum":"c064b378e76f0ab66906a75990b4d7ffcd0e99ed","size":2546,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-1.0.0-alpha.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-1.0.0-alpha.1.tgz"},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-memoize-1.0.0-alpha.1.tgz_1501357798618_0.9652158336248249"},"directories":{},"publish_time":1501357798711,"_hasShrinkwrap":false,"_cnpm_publish_time":1501357798711,"_cnpmcore_publish_time":"2021-12-16T17:19:11.496Z"},"0.0.4":{"name":"typescript-memoize","version":"0.0.4","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","dependencies":{"core-js":"2.4.1"},"devDependencies":{"@types/core-js":"0.9.35","typescript":"2.1.4"},"gitHead":"13d856c4e04c1d93276fa3f362160e5982de1bbf","_id":"typescript-memoize@0.0.4","_shasum":"a09bcee693429135d717b30ed7b60297f27e4b76","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"dist":{"shasum":"a09bcee693429135d717b30ed7b60297f27e4b76","size":5966,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-0.0.4.tgz"},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-memoize-0.0.4.tgz_1495643965360_0.9528575448784977"},"directories":{},"publish_time":1495643965500,"_hasShrinkwrap":false,"_cnpm_publish_time":1495643965500,"_cnpmcore_publish_time":"2021-12-16T17:19:11.718Z"},"0.0.3":{"name":"typescript-memoize","version":"0.0.3","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","dependencies":{"core-js":"^2.4.1"},"devDependencies":{"@types/core-js":"^0.9.35","typescript":"^2.1.4"},"gitHead":"022906d4b8dd34a443d70449e89ada02dcbb7067","_id":"typescript-memoize@0.0.3","_shasum":"e9cce6fdc594eb6b5b0ae171e82751185f7643c3","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"dist":{"shasum":"e9cce6fdc594eb6b5b0ae171e82751185f7643c3","size":4838,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-0.0.3.tgz"},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/typescript-memoize-0.0.3.tgz_1481304155103_0.7763580903410912"},"directories":{},"publish_time":1481304155340,"_hasShrinkwrap":false,"_cnpm_publish_time":1481304155340,"_cnpmcore_publish_time":"2021-12-16T17:19:11.907Z"},"0.0.2":{"name":"typescript-memoize","version":"0.0.2","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","files":["./dist/memoize-decorator.d.ts","./dist/memoize-decorator.js","./dist/memoize-decorator.js.map","./src/memoize-decorator.ts"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","dependencies":{"core-js":"^2.4.1"},"devDependencies":{"@types/core-js":"^0.9.35","typescript":"^2.1.4"},"gitHead":"022906d4b8dd34a443d70449e89ada02dcbb7067","_id":"typescript-memoize@0.0.2","_shasum":"182337fad330e70af7a41212befba889c614edcd","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"dist":{"shasum":"182337fad330e70af7a41212befba889c614edcd","size":522,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-0.0.2.tgz"},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/typescript-memoize-0.0.2.tgz_1481303766795_0.059444147162139416"},"directories":{},"publish_time":1481303769079,"_hasShrinkwrap":false,"_cnpm_publish_time":1481303769079,"_cnpmcore_publish_time":"2021-12-16T17:19:12.107Z"},"0.0.1":{"name":"typescript-memoize","version":"0.0.1","description":"Memoize decorator for Typescript","main":"./dist/memoize-decorator.js","typings":"./dist/memoize-decorator.d.ts","files":["./dist/**/*.*","./src/**/*.*"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/darrylhodgins/typescript-memoize.git"},"keywords":["typescript","memoize","functional","decorator"],"author":{"name":"Darryl Hodgins","email":"darrylh@darryh.ca"},"license":"MIT","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","dependencies":{"core-js":"^2.4.1"},"devDependencies":{"@types/core-js":"^0.9.35","typescript":"^2.1.4"},"gitHead":"d8b97bbb115bd3e31a42f1666f353aa245d227e7","_id":"typescript-memoize@0.0.1","_shasum":"ce13789bc5355927131044281adaf736793f4eb6","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"darrylhodgins","email":"darrylh@darrylh.ca"},"dist":{"shasum":"ce13789bc5355927131044281adaf736793f4eb6","size":568,"noattachment":false,"key":"/typescript-memoize/-/typescript-memoize-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/typescript-memoize/download/typescript-memoize-0.0.1.tgz"},"maintainers":[{"name":"darrylhodgins","email":"darrylh@darrylh.ca"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/typescript-memoize-0.0.1.tgz_1481303029394_0.832966229878366"},"directories":{},"publish_time":1481303029641,"_hasShrinkwrap":false,"_cnpm_publish_time":1481303029641,"_cnpmcore_publish_time":"2021-12-16T17:19:12.288Z"}},"readme":"# typescript-memoize\n\n[![npm](https://img.shields.io/npm/v/typescript-memoize.svg)](https://www.npmjs.com/package/typescript-memoize)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/darrylhodgins/typescript-memoize/master/LICENSE)\n![Test](https://github.com/darrylhodgins/typescript-memoize/workflows/Test/badge.svg)\n\nA memoize decorator for Typescript.\n\n## Installation\n\n```\nnpm install --save typescript-memoize\n```\n\n## Usage:\n\n```typescript\n@Memoize(hashFunction?: (...args: any[]) => any)\n```\n\nYou can use it in four ways:\n\n* Memoize a `get` accessor,\n* Memoize a method which takes no parameters,\n* Memoize a method which varies based on its first parameter only,\n* Memoize a method which varies based on some combination of parameters\n\nYou can call memoized methods *within* the same class, too.  This could be useful if you want to memoize the return value for an entire data set, and also a filtered or mapped version of that same set.\n\n## Memoize a `get` accessor, or a method which takes no parameters\n\nThese both work the same way. Subsequent calls to a memoized method without parameters, or to a `get` accessor, always return the same value.\n\nI generally consider it an anti-pattern for a call to a `get` accessor to trigger an expensive operation.  Simply adding `Memoize()` to a `get` allows for seamless lazy-loading.\n\n```typescript\nimport {Memoize,MemoizeExpiring} from 'typescript-memoize';\n\nclass SimpleFoo {\n\n    // Memoize a method without parameters\n    @Memoize()\n    public getAllTheData() {\n       // do some expensive operation to get data\n       return data;\n    }\n\n    // Memoize a method and expire the value after some time in milliseconds\n    @MemoizeExpiring(5000)\n    public getDataForSomeTime() {\n        // do some expensive operation to get data\n        return data;\n    }\n\n    // Memoize a getter\n    @Memoize()\n    public get someValue() {\n        // do some expensive operation to calculate value\n        return value;\n    }\n\n}\n```\n\nAnd then we call them from somewhere else in our code:\n\n```typescript\nlet simpleFoo = new SimpleFoo();\n\n// Memoizes a calculated value and returns it:\nlet methodVal1 = simpleFoo.getAllTheData();\n\n// Returns memoized value\nlet methodVal2 = simpleFoo.getAllTheData();\n\n// Memoizes (lazy-loads) a calculated value and returns it:\nlet getterVal1 = simpleFoo.someValue;\n\n// Returns memoized value\nlet getterVal2 = simpleFoo.someValue;\n\n```\n\n## Memoize a method which varies based on its first parameter only\n\nSubsequent calls to this style of memoized method will always return the same value.\n\nI'm not really sure why anyone would use this approach to memoize a method with *more* than one parameter, but it's possible.\n\n```typescript\nimport {Memoize} from 'typescript-memoize';\n\nclass ComplicatedFoo {\n\n\t// Memoize a method without parameters (just like the first example)\n\t@Memoize()\n\tpublic getAllTheData() {\n\t\t// do some expensive operation to get data\n\t\treturn data;\n\t}\n\n\t// Memoize a method with one parameter\n\t@Memoize()\n\tpublic getSomeOfTheData(id: number) {\n\t\tlet allTheData = this.getAllTheData(); // if you want to!\n\t\t// do some expensive operation to get data\n\t\treturn data;\n\t}\n\n\t// Memoize a method with multiple parameters\n\t// Only the first parameter will be used for memoization\n\t@Memoize()\n\tpublic getGreeting(name: string, planet: string) {\n\t\treturn 'Hello, ' + name + '! Welcome to ' + planet;\n\t}\n\n}\n```\n\nWe call these methods from somewhere else in our code:\n\n```typescript\nlet complicatedFoo = new ComplicatedFoo();\n\n// Returns calculated value and memoizes it:\nlet oneParam1 = complicatedFoo.getSomeOfTheData();\n\n// Returns memoized value\nlet oneParam2 = complicatedFoo.getSomeOfTheData();\n\n// Memoizes a calculated value and returns it:\n// 'Hello, Darryl! Welcome to Earth'\nlet greeterVal1 = complicatedFoo.getGreeting('Darryl', 'Earth');\n\n// Ignores the second parameter, and returns memoized value\n// 'Hello, Darryl! Welcome to Earth'\nlet greeterVal2 = complicatedFoo.getGreeting('Darryl', 'Mars');\n```\n\n## Memoize a method which varies based on some combination of parameters\n\nPass in a `hashFunction` which takes the same parameters as your target method, to memoize values based on all parameters, or some other custom logic\n\n```typescript\nimport {Memoize} from 'typescript-memoize';\n\nclass MoreComplicatedFoo {\n\n\t// Memoize a method with multiple parameters\n\t// Memoize will remember values based on keys like: 'name;planet'\n\t@Memoize((name: string, planet: string) => {\n\t\treturn name + ';' + planet;\n\t})\n\tpublic getBetterGreeting(name: string, planet: string) {\n\t\treturn 'Hello, ' + name + '! Welcome to ' + planet;\n\t}\n\t\n\t// Memoize based on some other logic\n\t@Memoize(() => {\n\t\treturn new Date();\n\t})\n\tpublic memoryLeak(greeting: string) {\n\t\treturn greeting + '!!!!!';\n\t}\n\n\t// Memoize also accepts parameters via a single object argument\n\t@Memoize({\n\t\texpiring: 10000, // milliseconds\n\t\thashFunction: (name: string, planet: string) => {\n\t\t\treturn name + ';' + planet;\n\t\t}\n\t})\n\tpublic getSameBetterGreeting(name: string, planet: string) {\n\t\treturn 'Hello, ' + name + '! Welcome to ' + planet;\n\t}\n\n}\n```\n\nWe call these methods from somewhere else in our code.  By now you should be getting the idea:\n\n```typescript\nlet moreComplicatedFoo = new MoreComplicatedFoo();\n\n// 'Hello, Darryl! Welcome to Earth'\nlet greeterVal1 = moreComplicatedFoo.getBetterGreeting('Darryl', 'Earth');\n\n// 'Hello, Darryl! Welcome to Mars'\nlet greeterVal2 = moreComplicatedFoo.getBetterGreeting('Darryl', 'Mars');\n\n// Fill up the computer with useless greetings:\nlet greeting = moreComplicatedFoo.memoryLeak('Hello');\n\n```\n\n## Memoize accepts one or more \"tag\" strings that allow the cache to be invalidated on command\n\nPassing an array with one or more \"tag\" strings these will allow you to later clear the cache of results associated with methods or the `get`accessors using the `clear()` function.\n\nThe `clear()` function also requires an array of \"tag\" strings.\n\n```typescript\nimport {Memoize} from 'typescript-memoize';\n\nclass ClearableFoo {\n\n\t// Memoize accepts tags\n\t@Memoize({ tags: [\"foo\", \"bar\"] })\n\tpublic getClearableGreeting(name: string, planet: string) {\n\t\treturn 'Hello, ' + name + '! Welcome to ' + planet;\n\t}\n\n\n\t// Memoize accepts tags\n\t@Memoize({ tags: [\"bar\"] })\n\tpublic getClearableSum(a: number, b: number) {\n\t\treturn a + b;\n\t}\n\n}\n```\n\nWe call these methods from somewhere else in our code.\n\n```typescript\nimport {clear} from 'typescript-memoize';\n\nlet clearableFoo = new ClearableFoo();\n\n// 'Hello, Darryl! Welcome to Earth'\nlet greeterVal1 = clearableFoo.getClearableGreeting('Darryl', 'Earth');\n\n// Ignores the second parameter, and returns memoized value\n// 'Hello, Darryl! Welcome to Earth'\nlet greeterVal2 = clearableFoo.getClearableGreeting('Darryl', 'Mars');\n\n// '3'\nlet sum1 = clearableFoo.getClearableSum(2, 1);\n\n// Ignores the second parameter, and returns memoized value\n// '3'\nlet sum2 = clearableFoo.getClearableSum(2, 2);\n\nclear([\"foo\"]);\n\n// The memoized values are cleared, return a new value\n// 'Hello, Darryl! Welcome to Mars'\nlet greeterVal3 = clearableFoo.getClearableGreeting('Darryl', 'Mars');\n\n\n// The memoized value is not associated with 'foo' tag, returns memoized value\n// '3'\nlet sum3 = clearableFoo.getClearableSum(2, 2);\n\nclear([\"bar\"]);\n\n// The memoized values are cleared, return a new value\n// 'Hello, Darryl! Welcome to Earth'\nlet greeterVal4 = clearableFoo.getClearableGreeting('Darryl', 'Earth');\n\n\n// The memoized values are cleared, return a new value\n// '4'\nlet sum4 = clearableFoo.getClearableSum(2, 2);\n\n```\n","_attachments":{},"homepage":"https://github.com/darrylhodgins/typescript-memoize#readme","bugs":{"url":"https://github.com/darrylhodgins/typescript-memoize/issues"},"license":"MIT"}