{"_id":"memorizer","_rev":"237936","name":"memorizer","description":"memoize a getter of an object","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"jonathanong","email":""},{"name":"jongleberry","email":""}],"time":{"modified":"2023-03-24T16:42:16.000Z","created":"2014-08-04T07:40:34.629Z","1.0.1":"2015-12-22T02:43:54.953Z","1.0.0":"2014-08-04T07:40:34.629Z"},"users":{},"author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"repository":{"type":"git","url":"git+https://github.com/jonathanong/memorizer.git"},"versions":{"1.0.1":{"name":"memorizer","description":"memoize a getter of an object","version":"1.0.1","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/jonathanong/memorizer.git"},"dependencies":{},"devDependencies":{"mocha":"2.3.4","istanbul":"0"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["memoize","memo","getter"],"files":["index.js"],"gitHead":"aa92fa060257523d94359cd3e2973b9c887be5b0","bugs":{"url":"https://github.com/jonathanong/memorizer/issues"},"homepage":"https://github.com/jonathanong/memorizer#readme","_id":"memorizer@1.0.1","_shasum":"ff21822b309395baa1cc7a824ce19a135cc11447","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.2.0","_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"dist":{"shasum":"ff21822b309395baa1cc7a824ce19a135cc11447","size":1742,"noattachment":false,"key":"/memorizer/-/memorizer-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/memorizer/download/memorizer-1.0.1.tgz"},"maintainers":[{"name":"jonathanong","email":""},{"name":"jongleberry","email":""}],"directories":{},"publish_time":1450752234953,"_hasShrinkwrap":false,"_cnpm_publish_time":1450752234953,"_cnpmcore_publish_time":"2021-12-18T14:21:26.748Z"},"1.0.0":{"name":"memorizer","description":"memoize a getter of an object","version":"1.0.0","author":{"name":"Jonathan Ong","email":"me@jongleberry.com","url":"http://jongleberry.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/jonathanong/memorizer"},"dependencies":{},"devDependencies":{"mocha":"1","istanbul":"0"},"scripts":{"test":"mocha --reporter spec","test-cov":"istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot","test-travis":"istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"},"keywords":["memoize","memo","getter"],"files":["index.js"],"gitHead":"34c789e2fb9191fdd7a34293708d75acdeddfeb9","bugs":{"url":"https://github.com/jonathanong/memorizer/issues"},"homepage":"https://github.com/jonathanong/memorizer","_id":"memorizer@1.0.0","_shasum":"c66c52498dfa9a3faa4e1d484e7f02e0cb5b1410","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"jonathanong","email":"jonathanrichardong@gmail.com"},"maintainers":[{"name":"jonathanong","email":""},{"name":"jongleberry","email":""}],"dist":{"shasum":"c66c52498dfa9a3faa4e1d484e7f02e0cb5b1410","size":868,"noattachment":false,"key":"/memorizer/-/memorizer-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/memorizer/download/memorizer-1.0.0.tgz"},"directories":{},"publish_time":1407138034629,"_hasShrinkwrap":false,"_cnpm_publish_time":1407138034629,"_cnpmcore_publish_time":"2021-12-18T14:21:26.996Z"}},"readme":"\n# memorizer\n\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n\nMemoize a property with a lazy callback.\nGreat for creating internal promises or computationally expensive rproperties.\n\n```js\nconst memoize = require('memorizer')\n\nfunction Constructor () {\n  this.promise.then(val => {\n    // val === true\n  })\n}\n\nmemoize(Constructor.prototype, 'promise', function () {\n  return new Promise(true)\n})\n```\n\n## API\n\n### memoize(object: Object, property: String, getter: Function)\n\nThe `getter`'s return value will be memoized.\n\n[npm-image]: https://img.shields.io/npm/v/memorizer.svg?style=flat\n[npm-url]: https://npmjs.org/package/memorizer\n[travis-image]: https://img.shields.io/travis/jonathanong/memorizer.svg?style=flat\n[travis-url]: https://travis-ci.org/jonathanong/memorizer\n[coveralls-image]: https://img.shields.io/coveralls/jonathanong/memorizer.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/jonathanong/memorizer?branch=master\n","_attachments":{},"homepage":"https://github.com/jonathanong/memorizer#readme","bugs":{"url":"https://github.com/jonathanong/memorizer/issues"},"license":"MIT"}