{"_id":"json-storage","_rev":"23-422941ff6c6450cbe209b2f475145a56","name":"json-storage","description":"A wrapper for storage engines which use the W3C Storage API","dist-tags":{"latest":"2.1.2"},"versions":{"1.0.1":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"json-storage","description":"A wrapper for storage engines which use the W3C Storage API","keywords":["ender","localStorage","sessionStorage","globalStorage","Storage"],"version":"1.0.1","repository":{"type":"git","url":"git://github.com/coolaj86/json-storage-js.git"},"engines":{"node":">= v0.2.0"},"main":"index","dependencies":{},"devDependencies":{},"_npmJsonOpts":{"file":"/Users/coolaj86/.npm/json-storage/1.0.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"json-storage@1.0.1","_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"ae34e32b410bff0d56b39e302e2c519dc773e331","tarball":"https://registry.npmjs.org/json-storage/-/json-storage-1.0.1.tgz","integrity":"sha512-L/v//MkTeHmkfBrfe1AKxl19LPmqVUPK+rsEDz8MSVloizaSNVB8UUHhJ/HXsgv5D4glhQBEt6p+XF/fDyV1nA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYu5ygzGVG5sSc+ua1Ms0ttMsiexdhLJpVx4GZYWmUzAiAtbeR/kPUm8ETh0I+EW3UV46xwM5IXmP3D1oX52t6kwQ=="}]},"scripts":{},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"1.1.0":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"json-storage","description":"A wrapper for storage engines which use the W3C Storage API","keywords":["ender","localStorage","sessionStorage","globalStorage","Storage"],"version":"1.1.0","repository":{"type":"git","url":"git://github.com/coolaj86/json-storage-js.git"},"engines":{"node":">= v0.2.0"},"main":"index","browserDependencies":{},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"json-storage@1.1.0","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.9","_defaultsLoaded":true,"dist":{"shasum":"709883643dcf71e58f777165fc03a96b0594380f","tarball":"https://registry.npmjs.org/json-storage/-/json-storage-1.1.0.tgz","integrity":"sha512-/+xcnYp7B03VXecTHbvnMm+HoWIyKoj1lJU3HhS6ugNI6MzIJMp7jtxyKr3550mOwGI7PwVgTNRP+IDDOCcApw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGAwRIO5Hfzk7vnud4s9IUWoW/l8kxn0OArQ2M33P/vtAiEAn+OdQZB8/xdQV5duhUEzZg8Gcb+sHglV2PTGea3bQiM="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"1.1.1":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"json-storage","description":"A wrapper for storage engines which use the W3C Storage API","keywords":["ender","localStorage","sessionStorage","globalStorage","Storage"],"version":"1.1.1","repository":{"type":"git","url":"git://github.com/coolaj86/json-storage-js.git"},"engines":{"node":">= v0.2.0"},"main":"index","browserDependencies":{},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"json-storage@1.1.1","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.9","_defaultsLoaded":true,"dist":{"shasum":"02fa959f76de1e57cb003140af478a20e4ba17d8","tarball":"https://registry.npmjs.org/json-storage/-/json-storage-1.1.1.tgz","integrity":"sha512-Yl9AqLe6y2oXG8Kp9ZarERsNl52peD5kLwODDkRjVR3n9P7zY721IP0zYWyG05LP3v09zBNaerOq/MQGfBWbjA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwYHz7fMF1t3hxWAHoHmO/BTvszjavzykiX1AZHXaHCAIhAI4v9kI1y2igULyOVUzFUobTK47OJQs97FXRhWIMfnKg"}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"1.1.2":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"json-storage","description":"A wrapper for storage engines which use the W3C Storage API","keywords":["ender","localStorage","sessionStorage","globalStorage","Storage"],"version":"1.1.2","repository":{"type":"git","url":"git://github.com/coolaj86/json-storage-js.git"},"engines":{"node":">= v0.2.0"},"main":"index","browserDependencies":{},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"json-storage@1.1.2","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.9","_defaultsLoaded":true,"dist":{"shasum":"8b7fca683a11b6526967e528a6c31e531681570d","tarball":"https://registry.npmjs.org/json-storage/-/json-storage-1.1.2.tgz","integrity":"sha512-W0d8wpLtT2AZDmdMZWrQbUB7Hvmd22eunlP/IPBH6aHzoHPiYz6trVYJwZQK/BGF4XlH+6qOVCTCMQ5zyFe8yg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAIcRy7x3zWSrcxShaTxbfc8KOH6X9rRNc9PdKoR3hhcAiAqRcftwBs33xBfiGPN3j0j9N6ygKE9U/jhxMt3x42qwQ=="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"1.1.3":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"json-storage","description":"A wrapper for storage engines which use the W3C Storage API","keywords":["localStorage","sessionStorage","globalStorage","Storage"],"version":"1.1.3","repository":{"type":"git","url":"git://github.com/coolaj86/json-storage-js.git"},"engines":{"node":">= v0.2.0"},"main":"index","browserDependencies":{},"dependencies":{},"devDependencies":{},"_id":"json-storage@1.1.3","dist":{"shasum":"4c2c2ebf027a788728f0c667f35d65ed2ab65ded","tarball":"https://registry.npmjs.org/json-storage/-/json-storage-1.1.3.tgz","integrity":"sha512-edtA7HChKvPxgciJHQq6B9uCw0eSubQz54JOYqfBZ4f0U573Dn6jFYsK6k4TdAOpO2jCVRKtpGysJtR1Xhvcig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH1jVASHCDKoXaj4g+EIFhSqX/jDI2dHVTsyDUOLIF8gCIQDiIsHgB2Wt+nfFGRcITN11qzZlnOdginXsyNngRt0e2w=="}]},"_from":"./","_npmVersion":"1.2.12","_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"2.0.0":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.com"},"name":"json-storage","description":"A wrapper for storage engines which use the W3C Storage API","keywords":["dom","storage","json","w3c","localStorage","sessionStorage","globalStorage","Storage"],"version":"2.0.0","repository":{"type":"git","url":"git://github.com/coolaj86/json-storage-js.git"},"engines":{"node":">= v0.2.0"},"main":"json-storage","browserDependencies":{},"dependencies":{},"devDependencies":{},"bugs":{"url":"https://github.com/coolaj86/json-storage-js/issues"},"homepage":"https://github.com/coolaj86/json-storage-js","_id":"json-storage@2.0.0","dist":{"shasum":"933d781a838b3dcf718cb40b0a370f70250ef3a8","tarball":"https://registry.npmjs.org/json-storage/-/json-storage-2.0.0.tgz","integrity":"sha512-TYjw05JUm3YH0eQrInmmxFvL8GaqDLfj98rV6OFowinB8H9GnFLovbXVEK4Y9cqF0X9VTfDR/jZ11httUr4Ihg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6f38jxm/KIwQxjCTUPAy5Arx6yr2ZEcqp7TwPCNfcYgIgH/bk9GU3x036r55GSJJhE+5nVBZ+RB45JvYlnnra0I0="}]},"_from":"./","_npmVersion":"1.3.22","_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"2.0.1":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.com"},"name":"json-storage","description":"A wrapper for storage engines which use the W3C Storage API","keywords":["dom","storage","json","w3c","localStorage","sessionStorage","globalStorage","Storage"],"version":"2.0.1","repository":{"type":"git","url":"git://github.com/coolaj86/json-storage-js.git"},"engines":{"node":">= v0.2.0"},"main":"json-storage","browserDependencies":{},"dependencies":{},"devDependencies":{},"bugs":{"url":"https://github.com/coolaj86/json-storage-js/issues"},"homepage":"https://github.com/coolaj86/json-storage-js","_id":"json-storage@2.0.1","dist":{"shasum":"f1ce99a381302b7a7ad8b1475952ddbeb8c09687","tarball":"https://registry.npmjs.org/json-storage/-/json-storage-2.0.1.tgz","integrity":"sha512-7RgPSvN2Rtka2GKGspOBs6QrYMGTywo/EXDYcyxNRNpNW3BDIdmJITo17r6B33MGkG4WT+ICva1xj5d9szsDTg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+dK5Za6Cqaj++MwOXJJ+fHRiXBRCvWoJ4fVHaYA4Z/wIhAI3BQAI0lQ86C3x9H56+0MUMuoB/d71hVdyaL5oPLSv5"}]},"_from":"./","_npmVersion":"1.3.22","_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"2.1.0":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.com"},"name":"json-storage","description":"A wrapper for storage engines which use the W3C Storage API","keywords":["dom","storage","json","w3c","localStorage","sessionStorage","globalStorage","Storage"],"version":"2.1.0","repository":{"type":"git","url":"git://github.com/coolaj86/json-storage-js.git"},"engines":{"node":">= v0.2.0"},"main":"json-storage","browserDependencies":{},"dependencies":{},"devDependencies":{},"bugs":{"url":"https://github.com/coolaj86/json-storage-js/issues"},"homepage":"https://github.com/coolaj86/json-storage-js","_id":"json-storage@2.1.0","dist":{"shasum":"366b951d843f67d42f894da5976badb69986f323","tarball":"https://registry.npmjs.org/json-storage/-/json-storage-2.1.0.tgz","integrity":"sha512-CxAtMnpODh6PJHxDLfsPNQ6qPH13GlOcv3fkoRvyHBumgv45zTLFezl88UgL1NTnlYUO7HY6fRzz7kHrLs7sLQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAYTGQip1/3/KKF+ePXNb7JWU4YRGwCWmdty2iTiNX2xAiEAu4mOxxKYw3/uNF8QF0KQtBGAjkG70NcjdIbKCgF5oiQ="}]},"_from":"./","_npmVersion":"1.3.24","_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"2.1.1":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.com"},"name":"json-storage","description":"A wrapper for storage engines which use the W3C Storage API","keywords":["dom","storage","json","w3c","localStorage","sessionStorage","globalStorage","Storage"],"version":"2.1.1","repository":{"type":"git","url":"git://github.com/coolaj86/json-storage-js.git"},"engines":{"node":">= v0.2.0"},"main":"json-storage","browserDependencies":{},"dependencies":{},"devDependencies":{},"bugs":{"url":"https://github.com/coolaj86/json-storage-js/issues"},"homepage":"https://github.com/coolaj86/json-storage-js","_id":"json-storage@2.1.1","dist":{"shasum":"0096ba67aa3ba35da0512fee7c90e55fbddb3d21","tarball":"https://registry.npmjs.org/json-storage/-/json-storage-2.1.1.tgz","integrity":"sha512-bY5fsBr32NBg6aWlfaDVrz3ToPe+ml5aO51y41LyrRorJwVjeA7zp0zAeKAxgFewiTjK/5TV5ShTmw2SwqoVbQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGAY/JeW22dIW7pJLRcuOCFElaglwd5EWdd43PlqT232AiEAi5b5gOrtYN9CMDI7gmv82L8lle7espgrrzRhCJ7IlrQ="}]},"_from":"./","_npmVersion":"1.3.24","_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"2.1.2":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.com"},"name":"json-storage","description":"A wrapper for storage engines which use the W3C Storage API","keywords":["dom","storage","json","w3c","localStorage","sessionStorage","globalStorage","Storage"],"version":"2.1.2","repository":{"type":"git","url":"git://git.coolaj86.com/coolaj86/json-storage.js.git"},"engines":{"node":">= v0.2.0"},"main":"json-storage","browserDependencies":{},"dependencies":{},"devDependencies":{},"gitHead":"21098984f170d1169e11759cb752a37fd5ae2de3","_id":"json-storage@2.1.2","_npmVersion":"6.1.0","_nodeVersion":"10.6.0","_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"dist":{"integrity":"sha512-jUCntp87bttsDzO2RCHEFtv3CabycupCcXknPkvUwWW5UBHqc6gIl2g52w9U5efxT9imNUk/R+XT2wZouKfNFQ==","shasum":"9a0bd41d473ffcf8196eb824eb8e1bead2dedde8","tarball":"https://registry.npmjs.org/json-storage/-/json-storage-2.1.2.tgz","fileCount":7,"unpackedSize":9591,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYJMPCRA9TVsSAnZWagAAdW0P/i0ixZ5yjX+vRKrovLS8\n5jL3GjpxIxo6Tcc0nR0+Kn+hAtX1RjffvHZwxsHggR2BaH0nN+t4vfL9krXo\nm7nDxXzUvAEbemR7eNA5aFjm72BWBU9H62wMXWTojjd2852rNA8oMAPaU3Bi\nzYMHny5n58/m3bvvm+kdTt06mduWbYrzE6Pj5o39qem9uu9JFJ/WHpskNeAe\n5whuhr7I23wQE9zny4vtiUt4UAk5qugV6v4vxhIg0coFOnGwvD0KLSudmrN1\niTk2maszzOtmCtzOrSehfh6a431QZJMqUGvVqBP8hW4knsXnecuWET6JSxUh\nLixOcbuNC9D/kUhJdzCGwU7axt1t8629y5ZBpY338ylvGPy4uXc5LYWWhWpk\ndzijque0Vs2YbuTOIV65H+4jhfpAInlHY4SeTOZ/1sDkhW333PZ33c2MF9dy\n9UazhOzyOZD6KzlCvakEf2BhLk7GiaU3K0f4lLw8xyCy2LSacTuWQyVcFYrk\nAwGHx81YrSgoB/HahTXR1EiI3/6iOmE7nwBQcv231lB0WNQsPU0Qy6NCRGNS\nivANGmQDbbYKq+ki+DFw0LTZsRYqJ8oD8JtXlYH4tHE4nJkyqHUdIiw3M6wc\n1ob08QJ3up9EQ70fgonYNC6AAt1tBp7EvCc4O6gaK1OkQ6gARvg+6eVFOAMw\nAmkZ\r\n=9sQN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHcmDPi4KUbptsGEh5q7TbrBtS8wlhnqZiLOQbusuzk9AiABaBTy2DLtGCodeRHTi1IKqc0mFsHy5gDutn7VlC+Z+g=="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-storage_2.1.2_1533055759680_0.8325091479738853"},"_hasShrinkwrap":false}},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"time":{"modified":"2022-06-19T06:26:51.291Z","created":"2011-09-07T07:15:09.960Z","1.0.1":"2011-09-07T07:15:10.497Z","1.1.0":"2012-03-02T18:22:38.330Z","1.1.1":"2012-03-03T20:02:18.670Z","1.1.2":"2012-03-03T21:04:33.131Z","1.1.3":"2013-03-06T23:53:18.497Z","2.0.0":"2014-01-26T21:40:22.877Z","2.0.1":"2014-02-03T21:01:07.992Z","2.1.0":"2014-02-24T12:23:55.105Z","2.1.1":"2014-02-24T12:27:20.603Z","2.1.2":"2018-07-31T16:49:19.764Z"},"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.com"},"repository":{"type":"git","url":"git://git.coolaj86.com/coolaj86/json-storage.js.git"},"readme":"JsonStorage\n====\n\nA light, sensible abstraction for DOMStorage (such as localStorage).\n\nInstallation\n===\n\nBower (Browser)\n\n```bash\nbower install json-storage\n# or\nwget https://git.coolaj86.com/coolaj86/json-storage.js/raw/branch/master/json-storage.js\n```\n\nNode.JS (Server)\n\n```bash\nnpm install -S localStorage json-storage\n```\n\nUsage\n===\n\nMade for Node.js and Bower (browser-side).\n\n```javascript\nvar localStorage = require('localStorage')\n  , JsonStorage = require('json-storage').JsonStorage\n  , store = JsonStorage.create(localStorage, 'my-widget-namespace', { stringify: true })\n  , myValue = {\n        foo: \"bar\"\n      , baz: \"quux\"\n    }\n  ;\n\nstore.set('myKey', myValue);\nmyValue = store.get('myKey');\n```\n\nNOTE: When using with Node and the `localStorage` module,\nyou may wish to pass the `{ stringify: false }` option to prevent double stringification.\n\nAPI\n===\n\n  * `JsonStorage.create(DOMStorage, namespace, opts)`\n    * `DOMStorage` should be globalStorage, sessionStorage, or localStorage. Defaults to window.localStorage if set to `null`.\n    * `namespace` is optional string which allows multiple non-conflicting storage containers. For example you could pass two widgets different storage containers and not worry about naming conflicts:\n      * `Gizmos.create(JsonStorage.create(null, 'my-gizmos'))`\n      * `Gadgets.create(JsonStorage.create(null, 'my-gadgets'))`\n      * Namespacing can be turned off by explicitly setting `false`\n        * `Gadgets.create(JsonStorage.create(null, false))`\n    * `opts`\n      * `stringify` set to `false` in `node` to avoid double stringifying\n  * `store.get(key)`\n  * `store.set(key, value)`\n  * `store.remove(key)`\n  * `store.clear()`\n  * `store.keys()`\n  * `store.size()`\n  * `store.toJSON()`\n  * `JSON.stringify(store)`\n\n**NOTE**: You cannot omit optional parameters. Use `null` if you want accepts the defaults for some things and provide a values for others. For example: `JsonStorage.create(null, null, { stringify: false })`\n\nJSON / DOMStorage Conversion Gotchas\n===\n\nThese notes do not reflect a bugs or defects in this library,\nthey're simply to inform you of a few 'gotchas' inherent in JSON / DOMStorage conversion.\n\n99.999% of the time these gotchas shouldn't effect you in any way.\nIf they do, you're probably doing something wrong in the first place.\n\n\n### `undefined` vs `null`\n\nIt is not valid to set `undefined` in JSON. So setting a key to `undefined` will remove it from the store.\n\nThis means that `store.set('x')` is the same as `store.remove('x')`.\n\nTo save `undefined`, use `null` instead.\n\n\nNote that both values that exist as `null` and values that don't exist at all will return `null`.\n\n```javascript\nstore.set('existing-key', null);\nnull === store.get('existing-key');\nnull === store.get('non-existant-key');\n```\n\n\n### `null` vs `\"null\"`\n\nThe special case of `null` as `\"null\"`, aka `\"\\\"null\\\"\"`:\n\n`null`, and `\"null\"` both parse as `null` the \"object\", instead of one being the string (which would be `\"\\\"null\\\"\"`).\n\nObjects containing `null`, however, parse as expected `{ \"foo\": null, \"bar\": \"null\" }` will parse as `foo` being `null` but `bar` being `\"null\"`, much unlike the value `\"null\"` being parsed on its own.\n","readmeFilename":"README.md","keywords":["dom","storage","json","w3c","localStorage","sessionStorage","globalStorage","Storage"]}