{"_id":"jonathan","_rev":"30-e7c3173e9400f5b4cb80b00c1e90ef4a","name":"jonathan","description":"DEPRECATED! An in-memory cache for Node","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"jonathan","version":"1.0.0","description":"An in-memory cache for Node","repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"README.md","devDependencies":{"mocha":"^2.1.0","grunt":"^0.4.5","should":"^4.4.1"},"bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.0","dist":{"shasum":"71b6ccfdecbf304c4e8ed6792752d1ef9978bad2","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.0.tgz","integrity":"sha512-W3MmNlxoj7cJVLcqq+UeteSSeEfDC0cPKiz2h8Q+BXPKfz/h0q0Pv/75H15u5EjQ5SmjlKV5ErYpkNIwkeJvNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkjZTkN0WzdDtzKjWjwc2xvmn8UwjAAmkyvf16/O/V1gIhAL8FdaiHZBJPr0eCtny8XSg4XjwNGxyW3Flq4ePYeTVw"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}]},"1.0.1":{"name":"jonathan","version":"1.0.1","description":"An in-memory cache for Node","repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","grunt":"^0.4.5","should":"^4.4.1"},"bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.1","dist":{"shasum":"d7b0623fa14d116e5d9e252b3ed0ce5eea5ebe0b","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.1.tgz","integrity":"sha512-p222F9SwKuCJfDaL+XkyGWGveEnBA2AMoYeJ4XUHlUGe9E4RaHppRW8LybApLkny0oJYXGfxSz8V+b5yAvSJqQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHq9rT56q0nfUOB6cbMWstJ46HUjTkReDqShWS16qCBrAiEA4r/Rjap4TyP+7fJsgMMNq4CfbQkYcPG8FlGmJ3wGark="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}]},"1.0.2":{"name":"jonathan","version":"1.0.2","description":"An in-memory cache for Node","repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.2","dist":{"shasum":"ff549e88f5007940971310cea6f44ba943bf143a","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.2.tgz","integrity":"sha512-Udlt0Gd09V/F2jmh0Yu0Re8cf6cV4EXZATEEsGCspo4dqI3rVN1qoxjYJnW94TdZHvPaYM+u2hWHGLN4U771rg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCj6m8ukfWY/iAVG9xZKv3eNJc4A7YJen/stU5jpOdAlwIgOY7OaJfVMIzd/4oLJfJUl8zEldR7/KEl3oPWoLwYRT4="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}]},"1.0.3":{"name":"jonathan","version":"1.0.3","description":"An in-memory cache for Node","repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"scripts":{"test":"./node_modules/mocha/bin/mocha tests/*"},"bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.3","dist":{"shasum":"b9d0e4eea698023464608e7b9dd2dee6f01acfb2","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.3.tgz","integrity":"sha512-dd90kA4DqC3za5BtgpOOFNqxCxmRQTc3DXyaS8P1iD7K4EeA93hyU3v8A5kcyFPBxJV+fwDSeZNSi7E6/rBxzg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBnbO6C1La2qTaUuAvoDWj18j3oFhlXullyBqgYkQ58HAiB5CO9T1jxicS7vlaBoK0rU1CUw8frCiwpxWPF8VKBUPw=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}]},"1.0.4":{"name":"jonathan","version":"1.0.4","description":"An in-memory cache for Node","keywords":["cache","memory","timed cache"],"repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"scripts":{"test":"./node_modules/mocha/bin/mocha tests/*"},"bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.4","dist":{"shasum":"d03e3102a5cecee98c63384c8874d69025dc2d0b","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.4.tgz","integrity":"sha512-9PYXVpbK/MzJDoe9s5dqlwB2v6muV/xy/8WAl5dwhzN50z54m2OyGuV644vVSvLDzYBPRhyf7c8bPjJaNURq0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFUb9pB/GbuPlAVWYZd/gU/9N6ARqTGxh0GKQtbCHEhrAiEAgMbdUocgaolxHUcbRk85B8na5O/xPs0y8G7CvddfIn0="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}]},"1.0.5":{"name":"jonathan","version":"1.0.5","description":"An in-memory cache for Node","keywords":["cache","memory","timed cache"],"repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"scripts":{"test":"./node_modules/mocha/bin/mocha tests/*"},"bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.5","dist":{"shasum":"f24edb0ed7dadc4299f48bf9c254c012b75b65a1","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.5.tgz","integrity":"sha512-F1R2e0v5z2bvTo1h7O4m1YocENtGA+N7m0N+h3yZ7+d7w3bM+lBsbTIkM3CIrkx035z1gLTCbYdNj4INrf5iDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB6up1PoNt4r7nggSruQUCJalwe6k1IvR3/ulxdfTH9rAiAy4yuoycyj4XoOSBUCqBqwcVKXJPQibkyiIa57wkmB5Q=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}]},"1.0.6":{"name":"jonathan","version":"1.0.6","description":"An in-memory cache for Node","keywords":["cache","memory","timed cache"],"repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"scripts":{"test":"./node_modules/mocha/bin/mocha tests/*"},"bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.6","dist":{"shasum":"75276ff6773b31b2f41142091a06706c682f1784","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.6.tgz","integrity":"sha512-N/bF1V2yuTYlVKHQQLoFEDniV0YsCZVVYKbZir8D2I9WMqhcgg30rV5T7o3yhAo9FkR0CS2puwGXSUxoZ+S6cw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTX9onjAZpxKjj6JRu6pI1MCZ5jpe3mdBCqTgUTXNETQIgTn+LHnSpCx0sT71tokwEl4ox7K/TbpykigXvzw+n4DA="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}]},"1.0.7":{"name":"jonathan","version":"1.0.7","description":"An in-memory cache for Node","keywords":["cache","memory","timed cache"],"repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"scripts":{"test":"./node_modules/mocha/bin/mocha tests/*"},"bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.7","dist":{"shasum":"5bf3e7ed3ff914a3c9e31adc9d11519a84d95722","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.7.tgz","integrity":"sha512-vIIoeUMzbIw3Ddft3LfSNlHRnnO7DkhT0JfAFi4NnVDkYkyu8/4Fv3TSsqihWemi+rhm3hWr4NBuY3Gf9sVBNQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID+grLg+v97RNiFj511IBHn0KmBhWDdog5lfwcOFWJ/WAiAJtk3ludtFpOI207Bj5cINAzNWBlsyJQB7OwjutksVNw=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}]},"1.0.8":{"name":"jonathan","version":"1.0.8","description":"An in-memory cache for Node","keywords":["cache","memory","timed cache"],"repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"scripts":{"test":"./node_modules/mocha/bin/mocha tests/*"},"bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.8","dist":{"shasum":"fe81fd6bec69f5fcf1bbb49aa905daad8f22b7ea","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.8.tgz","integrity":"sha512-pCR2+rSMX59OChn7bcLN7JzM1r/g9JlKE2jyVX3FZTZZXmEOZdLqyykLIu0hQZpbuAIdKMQlPBLxKgaTnzpshA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC17aU7CDFnNNjUgU1qXHGd08XHaApXzD+u+dWyIX8MPAiAyD1iOuMMtfa/jNyCpOhOs5VFtTY7d4R7eoYwlxohC6A=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}]},"1.0.9":{"name":"jonathan","version":"1.0.9","description":"An in-memory cache for Node","keywords":["cache","memory","timed cache"],"repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"scripts":{"test":"NODE_ENV=test ./node_modules/mocha/bin/mocha tests/*"},"gitHead":"bef5e8bcc051fd40a34de918b8bfe2a9d825865c","bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.9","_shasum":"1f2939933309094876cec8004961cd1048f06f2a","_from":".","_npmVersion":"2.1.17","_nodeVersion":"0.10.31","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}],"dist":{"shasum":"1f2939933309094876cec8004961cd1048f06f2a","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.9.tgz","integrity":"sha512-ZSI1AlBn0k663zovzfwTvwwdBn1EJo6cbnOQh6LvcBbP/Aq70a9QVKfgoe4ebWj/+eBdKWY55wmK36lm3pRtHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAdosUe4Z7MPKsLt0i8OTJ4eSSkUHkB3pTL+frnn1H5pAiEAlwSA6VkRW8W6HW2og+sYN4R+zCN81VMMC00+QU2t2MM="}]}},"1.0.10":{"name":"jonathan","version":"1.0.10","description":"An in-memory cache for Node","keywords":["cache","memory","timed cache"],"repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"scripts":{"test":"NODE_ENV=test ./node_modules/mocha/bin/mocha tests/*"},"gitHead":"5e3d4f619e68fb12e048c0d57ff0dd1be13b0b65","bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.10","_shasum":"f7eb8dee88538e90d72ff422e8c9542afcbc77c9","_from":".","_npmVersion":"2.1.17","_nodeVersion":"0.10.31","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}],"dist":{"shasum":"f7eb8dee88538e90d72ff422e8c9542afcbc77c9","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.10.tgz","integrity":"sha512-+WmoActdm6qjv5Gf8rIDiJmL16hs6TXxrSwZCM9lVwLb0KSXwIYHB/ZC4YfuwR17nj/XmkHTK3hyr0qbf+5cKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeL4OamC+8DAKe7BtgQujLmlfumgYvsShVEKxBH3AaRwIgR7PyVkC1TfdJzYRyplkoiclXfyBHeAPtiKc/aqUheGE="}]}},"1.0.11":{"name":"jonathan","version":"1.0.11","description":"An in-memory cache for Node","keywords":["cache","memory","timed cache"],"repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"scripts":{"test":"NODE_ENV=test ./node_modules/mocha/bin/mocha tests/*"},"gitHead":"f02d9dfe2808004ff8e4f3e5539116fa085b0099","bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.11","_shasum":"883bbb78a0784ece16f6814a55fc40429b325483","_from":".","_npmVersion":"2.1.17","_nodeVersion":"0.10.35","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}],"dist":{"shasum":"883bbb78a0784ece16f6814a55fc40429b325483","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.11.tgz","integrity":"sha512-Nwmj+bDeluWrS/FdBnMBf70qwkNL9P+deOEtVeq5rQgoeaE1z0RM35lBSIF9w1Bs/y3DtRLSyLP4CrJuzuG4Sg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZNCBI7RSKTdtjhXfMD9auIyShtje29sgQCobzrYWdKQIhAMxB92kbo6CZ+jgthpIRBN8C1/UrfRQRI0nv2R+UOuzp"}]}},"1.0.12":{"name":"jonathan","version":"1.0.12","description":"An in-memory cache for Node","keywords":["cache","memory","timed cache"],"repository":{"type":"git","url":"https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"scripts":{"test":"NODE_ENV=test ./node_modules/mocha/bin/mocha tests/*"},"gitHead":"bbf3a043920f2c11ccc2eb21edbe03eb84f9d660","bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan","_id":"jonathan@1.0.12","_shasum":"a339391c01f0db56540db92b090ee6bc2377cbbe","_from":".","_npmVersion":"2.1.17","_nodeVersion":"0.10.35","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}],"dist":{"shasum":"a339391c01f0db56540db92b090ee6bc2377cbbe","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.0.12.tgz","integrity":"sha512-SZDqmJwTSO8wudPdGs5ofjlMetg5fpJlC54PiTnsolnqs6ZNGLARDs18CbexBET0hHixRerv2zGmrWYA0GBFkw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDU5gNSweKrhcFSlYvMMA9i31CPxXF0kcogChHt6iPVcQIhAI0ef6UuW3qjS9vGrGB5vvjeuE792Y6YuTi0bN5MhksU"}]}},"1.1.0":{"name":"jonathan","version":"1.1.0","description":"DEPRECATED! An in-memory cache for Node","keywords":["cache","memory","timed cache"],"repository":{"type":"git","url":"git+https://github.com/jamesseanwright/jonathan.git"},"README":"https://github.com/jamesseanwright/jonathan/blob/master/README.md","devDependencies":{"mocha":"^2.1.0","should":"^4.4.1"},"scripts":{"test":"NODE_ENV=test ./node_modules/mocha/bin/mocha tests/*"},"gitHead":"c67464ee41e6c6e02f1cd6b6de857972208bb6bc","bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"homepage":"https://github.com/jamesseanwright/jonathan#readme","_id":"jonathan@1.1.0","_shasum":"4390504eb7f9b03825a43a51c4a0d443e854926b","_from":".","_npmVersion":"2.14.20","_nodeVersion":"4.4.0","_npmUser":{"name":"jamesseanwright","email":"james@jamesswright.co.uk"},"dist":{"shasum":"4390504eb7f9b03825a43a51c4a0d443e854926b","tarball":"https://registry.npmjs.org/jonathan/-/jonathan-1.1.0.tgz","integrity":"sha512-OasfHJBYjEtc6z//fayFuCX7t0CXLQPm7EYHqpnROJ7grtP1jnl2gQhsWsWv51WOqgPqJ1HTigcg4jFzTwZbUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVGdkmu+InSirOG43w98V9Z4w6d12JeTNOzG+a/6Wj/QIhANRMAdCmG1l0R8ka6jKNxdKgyJMGjayEhaz20B2xXzB0"}]},"maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/jonathan-1.1.0.tgz_1462882740111_0.8551203710958362"}}},"readme":"# DEPRECATED\n\nThis was the first npm module that I published since returning to web development. It was mainly an experiment with TDD in Node.js, and in retrospect, it isn't that great; the worst offender is that it uses `setInterval` to remove items from the cache, rather than simply attaching a timestamp to cache items, when stored, for later comparison.\n\nThe module will still be available, and I might consider unpublishing it (GASP) if I can confirm that it is no longer being downloaded. In the meantime, you should migrate to [stale-lru-cache](https://www.npmjs.com/package/stale-lru-cache); it's ridiculously fast.\n\n\n\n\n# Jonathan [![Build status](https://travis-ci.org/jamesseanwright/jonathan.svg)](https://travis-ci.org/jamesseanwright/jonathan)\n\n[(npm)](http://npmjs.org/jonathan)\n\nAn in-memory cache for Node.js\n\n## Installation\n\nJonathan can be installed into your project via [npm](https://www.npmjs.com/):\n\n\n```\nnpm install jonathan --save\n```\n\n## Basic usage\n\n```\n'use strict';\n\nvar http = require('http');\nvar jonathan = require('jonathan');\nvar server;\n\nserver = http.createServer(function (req, res) {\n\tjonathan.add('name', 'James');\n\tres.writeHead(200, { 'Content-Type': 'text/plain' });\n\tres.end('The name stored in Jonathan is: ' + jonathan.get('name'));\n});\n\nserver.listen(3000);\nconsole.log('Listening on port 3000');\n```\n\n## APIs\n\n### `Number.prototype` polyfills\n\nAs of version 1.0.9, this module attaches a set of properties to Number's prototype so that you can write durations more fluently, such as:\n```\njonathan.add('key', 'value', (2).weeks);\njonathan.add('key2', ['one', 'two'], (5).months);\njonathan.add('key3', { name: 'Bob' }, (50).seconds);\n```\n\nThese properties simply multiply the Number object on which you've called the method by a predefined amount of milliseconds.\n\nHere are all of the attached projects:\n\n* `Number.prototype.seconds`\n* `Number.prototype.minutes`\n* `Number.prototype.hours`\n* `Number.prototype.days`\n* `Number.prototype.weeks`\n* `Number.prototype.months`\n* `Number.prototype.years`\n\nPrior to 1.0.9, these properties exist as methods, and thus must be invoked explicitly.\n\n### jonathan\n\n####~~`init()` - `Function`~~ removed in 1.0.9\nInitialises the cache. You must call this before you can use Jonathan.\n\n####`invalidate()` - `Function`\nInvalidates the entire cache\n\n####`add(key, value, duration)` - `Function`\nAdds any JavaScript `Object` to the cache under a specified `String` key. If the `duration` parameter is not specified, it will be stored indefinitely, otherwise a `Number` is required representing the total milliseconds to persist the data (see *Number.prototype polyfills*.)\n\n####`get(key)` - `Function`\nRetrieves a value from the cache by the specified key. If the key is not present in the cache, this method will return `undefined`.\n\n####`remove(key)` - `Function`\nRemoves a key, and its accompanying value, from the cache.\n\n## Tests\n\nJonathan was written using test-driven development (TDD) with Mocha. To run the tests, simply invoke `npm test`.\n","maintainers":[{"name":"jamesseanwright","email":"james@jamesswright.co.uk"}],"time":{"modified":"2022-06-19T04:46:00.871Z","created":"2014-12-23T17:11:12.022Z","1.0.0":"2014-12-23T17:11:12.022Z","1.0.1":"2014-12-23T17:37:23.275Z","1.0.2":"2014-12-23T18:12:30.481Z","1.0.3":"2014-12-23T21:19:11.167Z","1.0.4":"2014-12-23T21:21:19.575Z","1.0.5":"2014-12-23T21:27:13.540Z","1.0.6":"2014-12-23T21:57:39.904Z","1.0.7":"2014-12-23T22:02:14.009Z","1.0.8":"2014-12-23T22:07:51.390Z","1.0.9":"2015-01-05T17:35:31.407Z","1.0.10":"2015-01-05T17:38:23.894Z","1.0.11":"2015-01-20T17:47:04.025Z","1.0.12":"2015-01-20T17:49:07.364Z","1.1.0":"2016-05-10T12:19:01.431Z"},"homepage":"https://github.com/jamesseanwright/jonathan#readme","repository":{"type":"git","url":"git+https://github.com/jamesseanwright/jonathan.git"},"bugs":{"url":"https://github.com/jamesseanwright/jonathan/issues"},"readmeFilename":"README.md","keywords":["cache","memory","timed cache"],"users":{"dyslexicchris":true}}