{"_id":"memoizeasync","_rev":"480482","name":"memoizeasync","description":"Helper for memoizing async functions and methods","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"time":{"modified":"2021-08-05T09:34:20.000Z","created":"2012-12-11T22:49:10.139Z","1.1.0":"2017-12-27T21:59:18.619Z","1.0.0":"2017-02-20T13:16:11.821Z","0.9.0":"2016-02-29T14:23:42.172Z","0.8.0":"2014-11-17T10:04:08.645Z","0.7.0":"2014-10-17T03:03:10.813Z","0.6.0":"2014-04-26T21:23:26.954Z","0.5.3":"2014-04-26T21:20:28.270Z","0.5.2":"2014-02-18T14:48:50.887Z","0.5.0":"2014-02-17T14:14:33.558Z","0.5.1":"2014-02-17T14:14:27.502Z","0.4.2":"2013-10-06T21:27:22.643Z","0.4.1":"2013-10-06T18:23:05.848Z","0.4.0":"2013-10-06T16:11:36.903Z","0.3.1":"2013-09-06T22:09:27.894Z","0.3.0":"2013-08-27T20:49:30.083Z","0.1.1":"2013-04-03T21:52:03.458Z","0.1.0":"2013-04-03T12:13:51.900Z","0.0.1":"2012-12-11T22:49:10.139Z"},"users":{"farskipper":true},"author":{"name":"Andreas Lind","email":"andreas@one.com"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"versions":{"1.1.0":{"name":"memoizeasync","version":"1.1.0","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"2.5.0","passerror":"1.1.1"},"devDependencies":{"async":"^2.1.5","coveralls":"^2.11.16","eslint":"^3.15.0","eslint-config-onelint":"^2.0.0","mocha":"^3.2.0","nyc":"^10.1.2","sinon":"^1.17.7","unexpected":"^10.26.0","unexpected-sinon":"^10.7.0"},"scripts":{"lint":"eslint .","test":"mocha","travis":"npm test && npm run lint && npm run coverage && (<coverage/lcov.info coveralls || true)","coverage":"NODE_ENV=development nyc --reporter lcov --reporter text -- mocha && echo google-chrome coverage/lcov-report/index.html"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind","email":"andreas@one.com"},"license":"BSD","gitHead":"d9c6291245c11be059691203b89bf2999a511a82","bugs":{"url":"https://github.com/papandreou/node-memoizeasync/issues"},"homepage":"https://github.com/papandreou/node-memoizeasync#readme","_id":"memoizeasync@1.1.0","_shasum":"9d7028a6f266deb733510bb7dbba5f51878c561e","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"dist":{"shasum":"9d7028a6f266deb733510bb7dbba5f51878c561e","size":10931,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-1.1.0.tgz"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/memoizeasync-1.1.0.tgz_1514411957691_0.4431698862463236"},"publish_time":1514411958619,"_hasShrinkwrap":false,"_cnpm_publish_time":1514411958619},"1.0.0":{"name":"memoizeasync","version":"1.0.0","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"2.5.0","passerror":"1.1.1"},"devDependencies":{"async":"^2.1.5","coveralls":"^2.11.16","eslint":"^3.15.0","eslint-config-onelint":"^2.0.0","mocha":"^3.2.0","nyc":"^10.1.2","sinon":"^1.17.7","unexpected":"^10.26.0","unexpected-sinon":"^10.7.0"},"scripts":{"lint":"eslint .","test":"mocha","travis":"npm test && npm run lint && npm run coverage && (<coverage/lcov.info coveralls || true)","coverage":"NODE_ENV=development nyc --reporter lcov --reporter text -- mocha && echo google-chrome coverage/lcov-report/index.html"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind","email":"andreas@one.com"},"license":"BSD","gitHead":"d5a41e15dee9a9d64c1cf491a66ccbf9c835b6ac","bugs":{"url":"https://github.com/papandreou/node-memoizeasync/issues"},"homepage":"https://github.com/papandreou/node-memoizeasync#readme","_id":"memoizeasync@1.0.0","_shasum":"7b02a346f3885abb5dc37c0a43c1d202de8cb40a","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"dist":{"shasum":"7b02a346f3885abb5dc37c0a43c1d202de8cb40a","size":10837,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-1.0.0.tgz"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/memoizeasync-1.0.0.tgz_1487596571119_0.41019179369322956"},"publish_time":1487596571821,"_cnpm_publish_time":1487596571821,"_hasShrinkwrap":false},"0.9.0":{"name":"memoizeasync","version":"0.9.0","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"2.5.0","passerror":"1.1.1"},"devDependencies":{"async":"1.5.2","coveralls":"2.11.8","istanbul":"0.4.2","jshint":"2.9.1","mocha":"1.21.5","sinon":"1.17.3","unexpected":"10.9.1","unexpected-sinon":"10.1.1"},"scripts":{"prepublish":"mocha","lint":"jshint .","test":"mocha && npm run lint","travis":"npm test && npm run coverage && <coverage/lcov.info coveralls","coverage":"NODE_ENV=development istanbul cover _mocha -- --reporter dot"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind","email":"andreas@one.com"},"license":"BSD","gitHead":"7a8588a38a45c41f38315f4d7f66241099afb89b","bugs":{"url":"https://github.com/papandreou/node-memoizeasync/issues"},"homepage":"https://github.com/papandreou/node-memoizeasync#readme","_id":"memoizeasync@0.9.0","_shasum":"9e84654d0dcfc5defd7f251ef10085d3f0c5a8c6","_from":".","_npmVersion":"2.14.19","_nodeVersion":"0.10.42","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"dist":{"shasum":"9e84654d0dcfc5defd7f251ef10085d3f0c5a8c6","size":10592,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.9.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.9.0.tgz"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/memoizeasync-0.9.0.tgz_1456755819106_0.8803817357402295"},"publish_time":1456755822172,"_cnpm_publish_time":1456755822172,"_hasShrinkwrap":false},"0.8.0":{"name":"memoizeasync","version":"0.8.0","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"2.5.0","passerror":"0.0.2"},"devDependencies":{"async":"0.9.0","coveralls":"2.11.2","istanbul":"0.3.2","jshint":"2.5.6","mocha":"1.21.5","sinon":"1.10.3","unexpected":"5.0.0-beta9","unexpected-sinon":"3.0.2"},"scripts":{"prepublish":"mocha","lint":"jshint .","test":"mocha && npm run lint","travis":"npm test && npm run coverage && <coverage/lcov.info coveralls","coverage":"NODE_ENV=development istanbul cover _mocha -- --reporter dot"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","gitHead":"f6cc31aea1c6efc4318beb44e99fdac6f31cc7b6","bugs":{"url":"https://github.com/papandreou/node-memoizeasync/issues"},"homepage":"https://github.com/papandreou/node-memoizeasync","_id":"memoizeasync@0.8.0","_shasum":"dae48739655e61de56631080c0aa9131ca16e7d4","_from":".","_npmVersion":"2.0.0-beta.0","_npmUser":{"name":"gustavnikolaj","email":"gustavnikolaj@gmail.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"dist":{"shasum":"dae48739655e61de56631080c0aa9131ca16e7d4","size":10089,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.8.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.8.0.tgz"},"publish_time":1416218648645,"_cnpm_publish_time":1416218648645,"_hasShrinkwrap":false},"0.7.0":{"name":"memoizeasync","version":"0.7.0","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"2.5.0","passerror":"0.0.2"},"devDependencies":{"async":"0.9.0","coveralls":"2.11.2","istanbul":"0.3.2","jshint":"2.5.6","mocha":"1.21.5","sinon":"1.10.3","unexpected":"5.0.0-beta9","unexpected-sinon":"3.0.2"},"scripts":{"prepublish":"mocha","lint":"jshint .","test":"mocha && npm run lint","travis":"npm test && npm run coverage && <coverage/lcov.info coveralls","coverage":"NODE_ENV=development istanbul cover _mocha -- --reporter dot"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","gitHead":"0411a4645364a1bb35f9c46b022c780f0ca4cc63","bugs":{"url":"https://github.com/papandreou/node-memoizeasync/issues"},"homepage":"https://github.com/papandreou/node-memoizeasync","_id":"memoizeasync@0.7.0","_shasum":"7998e76ac60093338d23164c331593fd50f5b3a8","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"dist":{"shasum":"7998e76ac60093338d23164c331593fd50f5b3a8","size":10120,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.7.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.7.0.tgz"},"publish_time":1413514990813,"_cnpm_publish_time":1413514990813,"_hasShrinkwrap":false},"0.6.0":{"name":"memoizeasync","version":"0.6.0","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"=2.5.0","passerror":"=0.0.2"},"devDependencies":{"mocha":"=1.18.2","unexpected":"=3.1.5"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","bugs":{"url":"https://github.com/papandreou/node-memoizeasync/issues"},"homepage":"https://github.com/papandreou/node-memoizeasync","_id":"memoizeasync@0.6.0","dist":{"shasum":"a8e7ed4974096841db9abaff1d8f58391f3d99c8","size":6714,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.6.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.6.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1398547406954,"_cnpm_publish_time":1398547406954,"_hasShrinkwrap":false},"0.5.3":{"name":"memoizeasync","version":"0.5.3","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"=2.5.0","passerror":"=0.0.2"},"devDependencies":{"mocha":"=1.18.2","unexpected":"=3.1.5"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","bugs":{"url":"https://github.com/papandreou/node-memoizeasync/issues"},"homepage":"https://github.com/papandreou/node-memoizeasync","_id":"memoizeasync@0.5.3","dist":{"shasum":"4c9252ceaad7b9121fcde2cee031418e4814798c","size":6418,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.5.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.5.3.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1398547228270,"_cnpm_publish_time":1398547228270,"_hasShrinkwrap":false},"0.5.2":{"name":"memoizeasync","version":"0.5.2","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"=2.5.0","passerror":"=0.0.2"},"devDependencies":{"mocha":"=1.13.0","unexpected":"=1.0.1"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","bugs":{"url":"https://github.com/papandreou/node-memoizeasync/issues"},"_id":"memoizeasync@0.5.2","dist":{"shasum":"b8fe6c33e6ff29c884f4f7b4e635ecfe6ee44c61","size":6412,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.5.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.5.2.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1392734930887,"_cnpm_publish_time":1392734930887,"_hasShrinkwrap":false},"0.5.0":{"name":"memoizeasync","version":"0.5.0","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"=2.5.0","passerror":"=0.0.2"},"devDependencies":{"mocha":"=1.13.0","unexpected":"=1.0.1"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","bugs":{"url":"https://github.com/papandreou/node-memoizeasync/issues"},"_id":"memoizeasync@0.5.0","dist":{"shasum":"af8e1d94ef17c670fdccd478ec65ddbff0e4fe81","size":6347,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.5.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1392646473558,"_cnpm_publish_time":1392646473558,"_hasShrinkwrap":false},"0.5.1":{"name":"memoizeasync","version":"0.5.1","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"=2.5.0","passerror":"=0.0.2"},"devDependencies":{"mocha":"=1.13.0","unexpected":"=1.0.1"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","bugs":{"url":"https://github.com/papandreou/node-memoizeasync/issues"},"_id":"memoizeasync@0.5.1","dist":{"shasum":"30e654dbb079cf8dda9f83a9f7ee960090f05b00","size":6365,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.5.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.5.1.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1392646467502,"_cnpm_publish_time":1392646467502,"_hasShrinkwrap":false},"0.4.2":{"name":"memoizeasync","version":"0.4.2","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"=2.3.1","passerror":"=0.0.2"},"devDependencies":{"mocha":"=1.13.0","unexpected":"=1.0.1"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","_id":"memoizeasync@0.4.2","dist":{"shasum":"de0319f582796ee2a5781a94c7435f451b7f466c","size":6202,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.4.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.4.2.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1381094842643,"_cnpm_publish_time":1381094842643,"_hasShrinkwrap":false},"0.4.1":{"name":"memoizeasync","version":"0.4.1","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"=2.3.1","passerror":"=0.0.2"},"devDependencies":{"mocha":"=1.13.0","unexpected":"=1.0.1"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","_id":"memoizeasync@0.4.1","dist":{"shasum":"7b558f2c61a06989bffd11c72aa9449d5ac5a92f","size":6111,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.4.1.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1381083785848,"_cnpm_publish_time":1381083785848,"_hasShrinkwrap":false},"0.4.0":{"name":"memoizeasync","version":"0.4.0","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"=2.3.1","passerror":"=0.0.2"},"devDependencies":{"mocha":"=1.13.0","unexpected":"=1.0.1"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","_id":"memoizeasync@0.4.0","dist":{"shasum":"c2a5e6d3a897c9d27b0f4f7d3539f395ea48962e","size":5984,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.4.0.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1381075896903,"_cnpm_publish_time":1381075896903,"_hasShrinkwrap":false},"0.3.1":{"name":"memoizeasync","version":"0.3.1","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"=2.3.1"},"devDependencies":{"mocha":"=1.7.3","expect.js":"=0.2.0"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","readmeFilename":"README.md","_id":"memoizeasync@0.3.1","dist":{"shasum":"877e10426ef777ab2566134ae04a4d09a4829ac2","size":5466,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.3.1.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1378505367894,"_cnpm_publish_time":1378505367894,"_hasShrinkwrap":false},"0.3.0":{"name":"memoizeasync","version":"0.3.0","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{"lru-cache":"=2.3.1"},"devDependencies":{"mocha":"=1.7.3","expect.js":"=0.2.0"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","readmeFilename":"README.md","_id":"memoizeasync@0.3.0","dist":{"shasum":"549f73531ca9d42b9d318f90fe5badd9f3cf363e","size":5436,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.3.0.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1377636570083,"_cnpm_publish_time":1377636570083,"_hasShrinkwrap":false},"0.1.1":{"name":"memoizeasync","version":"0.1.1","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"mocha":"=1.7.3","expect.js":"=0.2.0"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","_id":"memoizeasync@0.1.1","dist":{"shasum":"f1852e1d0d097e4e82c2e1c9e3dea578c4750775","size":4267,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.1.1.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1365025923458,"_cnpm_publish_time":1365025923458,"_hasShrinkwrap":false},"0.1.0":{"name":"memoizeasync","version":"0.1.0","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"mocha":"=1.7.3","expect.js":"=0.2.0"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","readmeFilename":"README.md","_id":"memoizeasync@0.1.0","dist":{"shasum":"4c5bc416351e61a3adc5c1060c36cf3f189ac6a6","size":4267,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1364991231900,"_cnpm_publish_time":1364991231900,"_hasShrinkwrap":false},"0.0.1":{"name":"memoizeasync","version":"0.0.1","description":"Helper for memoizing async functions and methods","main":"lib/memoizeAsync.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"mocha":"=1.7.3","expect.js":"=0.2.0"},"scripts":{"prepublish":"mocha","test":"mocha"},"repository":{"type":"git","url":"git://github.com/papandreou/node-memoizeasync.git"},"keywords":["memo","memoize","async","cache"],"author":{"name":"Andreas Lind Petersen","email":"andreas@one.com"},"license":"BSD","_id":"memoizeasync@0.0.1","dist":{"shasum":"5883ed192c7d3972f2fb29ea4202d49a093763f7","size":3859,"noattachment":false,"key":"/memoizeasync/-/memoizeasync-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/memoizeasync/download/memoizeasync-0.0.1.tgz"},"_npmVersion":"1.1.63","_npmUser":{"name":"papandreou","email":"andreas@one.com"},"maintainers":[{"name":"papandreou","email":"andreas@one.com"}],"publish_time":1355266150139,"_cnpm_publish_time":1355266150139,"_hasShrinkwrap":false}},"readme":"node-memoizeasync\n=================\n\nYet another memoizer for asynchronous functions.\n\n[![NPM version](https://badge.fury.io/js/memoizeasync.png)](http://badge.fury.io/js/memoizeasync)\n[![Build Status](https://travis-ci.org/papandreou/node-memoizeasync.svg?branch=master)](https://travis-ci.org/papandreou/node-memoizeasync)\n[![Coverage Status](https://coveralls.io/repos/papandreou/node-memoizeasync/badge.png)](https://coveralls.io/r/papandreou/node-memoizeasync)\n[![Dependency Status](https://david-dm.org/papandreou/node-memoizeasync.png)](https://david-dm.org/papandreou/node-memoizeasync)\n\n```javascript\nvar memoizeAsync = require('memoizeasync');\n\nfunction myExpensiveComputation(arg1, arg2, cb) {\n   // ...\n   cb(null, result);\n}\n\nvar memoized = memoizeAsync(myExpensiveComputation);\n```\n\nNow `memoized` works exactly like `myExpensiveComputation`, except that\nthe actual computation is only performed once for each unique set of\narguments (apart from the callback):\n\n```javascript\nmemoized(42, 100, function (err, result) {\n    // Got the result!\n\n    memoized(42, 100, function (err, result) {\n        // Got the same result, and much faster this time!\n    });\n});\n```\n\nThe function returned by `memoizeAsync` invokes the wrapped function\nin the context it's called in itself, so `memoizeAsync` even works for\nmemoizing a method that has access to instance variables:\n\n```javascript\nfunction Foo(name) {\n    this.name = name;\n\n    this.myMethod = memoizeAsync(function (arg1, arg2, cb) {\n        console.log(\"Cool, this.name works here!\", this.name);\n        // ...\n        cb(null, \"That was tough, but I'm done now!\");\n    });\n}\n```\n\n(Unfortunately setting `Foo.prototype.myMethod = memoizeSync(...)`\nwouldn't work as the memoizer would be shared among all instances of\n`Foo`).\n\nTo distinguish different invocations (whose results need to be cached\nseparately) `memoizeAsync` relies on a naive stringification of the\narguments, which is looked up in an internally kept hash. If the\nfunction you're memoizing takes non-primitive arguments you might want\nto provide a custom `argumentsStringifier` as an option in the second\nargument to `memoizeAsync`. Otherwise all object arguments will be\nconsidered equal because they stringify to `[object Object]`:\n\n```javascript\nvar memoized = memoizeAsync(function functionToMemoize(obj, cb) {\n    // ...\n    cb(null, Object.keys(obj).join(''));\n}, {\n    argumentsStringifier: function (args) {\n       return args.map(function (arg) {return JSON.stringify(arg);}).join(\",\");\n    }\n);\n\nmemoized({foo: 'bar'}, function (err, result) {\n    // result === 'foo'\n    memoized({quux: 'baz'}), function (err, result) {\n        // result === 'quux'\n    });\n});\n```\n\nHad the custom `argumentsStringifier` not been provided, `result`\nwould have been `foo` both times.\n\nCheck out <a\nhref=\"https://github.com/papandreou/node-memoizeasync/blob/master/test/memoizeAsync.js\">the\ncustom argumentsStringifier test</a> for another example.\n\n\n### Purging and expiring memoized values ###\n\nYou can forcefully clear a specific memoized value using the `purge`\nmethod on the memoizer:\n\n```javascript\nvar memoized = memoizeAsync(function functionToMemoize(foo, cb) {\n    // ...\n    cb(null, theResult);\n});\nmemoized(123, function (err, value) {\n    memoized.purge(123);\n});\n```\n\n`memoized.purgeAll()` clears all memoized results.\n\nYou can also specify a custom ttl (in milliseconds) on the memoized\nresults:\n\n```javascript\nvar memoized = memoizeAsync(function functionToMemoize(cb) {\n    // ...\n    cb(null, theResult);\n}, {maxAge: 1000});\n```\n\nIn the above example the memoized value will be considered stale one\nsecond after it has been computed, and it will be recomputed next time\n`memoizeAsync` is invoked with the same arguments.\n\n`memoizeAsync` uses <a\nhref=\"https://github.com/isaacs/node-lru-cache\">node-lru-cache</a> to\nstore the memoized values, and it accepts the same parameters in the\n`options` object. If provided, the `length` function will be wrapped\nso it's called with the same arguments as the callback to the memoized\nfunction:\n\n```javascript\nvar fs = require('fs'),\n    memoizedFsReadFile = memoizeAsync(fs.readFile, {\n        max: 1000000,\n        length: function (err, body) {\n            return body.length;\n        },\n        maxAge: 1000\n    });\n```\n\nThe LRU instance is exposed in the `cache` property of the memoized\nfunction in case you need to access it. Note that the values stored in\nthe cache are arrays of parameters provided to the callback by the\nmemoized function. In most cases that will be `[err, result]`:\n\n\n```javascript\nvar numMemoizedErrors = 0;\nmemoized.cache.values().forEach(function (resultCallbackParams) {\n    if (resultCallbackParams[0]) {\n        numMemoizedErrors += 1;\n    }\n});\n```\n\nBesides the maxAge option that is provided by the LRU module, the\nmemoizer is augmented with a refreshAge option. When the memoizer\nis asked for a value which is post its refreshAge, it will start\nfetching a new value, while in the meantime it will return the\nvalue.\n\n```javascript\nvar memoizedFsReadFile = memoizeAsync(slowAsyncMethod, {\n        refreshAge: 900,\n        maxAge: 1000\n    });\n```\n\nError handling\n--------------\n\nIf a memoized function passes an error to its callback, memoizeAsync will catch\nand rethrow it, so memoizeAsync is transparent in that regard. By default,\nerrors won't be saved in the cache, so the original function will be run\nagain on the next invocation of the memoized function. If you want errors\nto be memoized as well, set the `errors` option to `true`.\n\nInstallation\n------------\n\nMake sure you have node.js and npm installed, then run:\n\n    npm install memoizeasync\n\nBrowser compatibility\n---------------------\n\n`memoizeAsync` uses the UMD wrapper, so it should also work in\nbrowsers. You should also have the <a\nhref=\"https://github.com/isaacs/node-lru-cache\">node-lru-cache</a>\nincluded:\n\n```html\n<script src=\"lru-cache.js\"></script>\n<script src=\"memoizeAsync.js\"></script>\n<script>\n    var memoizedFunction = memoizeAsync(function (cb) {\n        // ...\n    });\n</script>\n```\n\n`lru-cache` uses `Object.defineProperty` and doesn't include an UMD\nwrapper, but if you define a `shims` config it should be possible to\nget it memoizeAsync working with require.js, at least in newer browsers.\n\nLicense\n-------\n\n3-clause BSD license -- see the `LICENSE` file for details.\n","_attachments":{},"homepage":"https://github.com/papandreou/node-memoizeasync#readme","bugs":{"url":"https://github.com/papandreou/node-memoizeasync/issues"},"license":"BSD"}