{"_id":"js-storage","_rev":"9-b3140220f75eddbec53437b35ff6421d","name":"js-storage","description":"Plugin that simplify access to storages (HTML5) & cookies, add namespace storage and provide compatiblity for old browsers","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"js-storage","version":"1.0.0","author":{"name":"Julien Maurel","url":"https://github.com/julien-maurel"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.php"}],"devDependencies":{"gulp":"3.9.1","gulp-uglify":"1.5.3","gulp-rename":"1.2.2"},"description":"JS Storage is a plugin that simplify access to storages (HTML5) & cookies, add namespace storage functionality and provide compatiblity for old browsers with cookies!","keywords":["storage","html5","localStorage","sessionStorage","cookie","namespace"],"homepage":"https://github.com/julien-maurel/js-storage","bugs":{"url":"https://github.com/julien-maurel/js-storage/issues"},"repository":{"type":"git","url":"git+https://github.com/julien-maurel/js-storage.git"},"main":"./js.storage.js","files":["js.storage.js"],"gitHead":"c5392dd257734ea2208a825619ea38906c49e74b","_id":"js-storage@1.0.0","scripts":{},"_shasum":"114a657ecbb36a2faf3208b1a448a3c65a00bbd9","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"jmaurel","email":"fake@donotemail.me"},"dist":{"shasum":"114a657ecbb36a2faf3208b1a448a3c65a00bbd9","tarball":"https://registry.npmjs.org/js-storage/-/js-storage-1.0.0.tgz","integrity":"sha512-CyGjGmW/TqsqGiCJiluTk2XBxGS3P0UE7I3gbkZkvlOIAsSMB1pJ3UeMpusA3RVvXdN2bbzf75u6V9dDQYlQwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIECpv7wScBtIKFhob8dw5XNie/a8OlyYWhH8//skUa3zAiEA1pZE2u+ahr+LG8ICny3pskSlOVI6Oc7UzJxHC/T4Jr4="}]},"maintainers":[{"name":"jmaurel","email":"fake@donotemail.me"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/js-storage-1.0.0.tgz_1475065469089_0.6603555751498789"},"directories":{}},"1.0.1":{"name":"js-storage","version":"1.0.1","author":{"name":"Julien Maurel","url":"https://github.com/julien-maurel"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.php"}],"devDependencies":{"gulp":"3.9.1","gulp-uglify":"1.5.3","gulp-rename":"1.2.2"},"description":"JS Storage is a plugin that simplify access to storages (HTML5) & cookies, add namespace storage functionality and provide compatiblity for old browsers with cookies!","keywords":["storage","html5","localStorage","sessionStorage","cookie","namespace"],"homepage":"https://github.com/julien-maurel/js-storage","bugs":{"url":"https://github.com/julien-maurel/js-storage/issues"},"repository":{"type":"git","url":"git+https://github.com/julien-maurel/js-storage.git"},"main":"./js.storage.js","gitHead":"cf1585c9ad0bd6ee050d600fc0f897d4e5409af6","_id":"js-storage@1.0.1","scripts":{},"_shasum":"3b5b7fcf4c480f0895b1729894bfce862f8f8cdf","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"jmaurel","email":"fake@donotemail.me"},"dist":{"shasum":"3b5b7fcf4c480f0895b1729894bfce862f8f8cdf","tarball":"https://registry.npmjs.org/js-storage/-/js-storage-1.0.1.tgz","integrity":"sha512-8ndC1+RrF/lO5ny2UNDrYu06JV/QgMFz6ZNCqbMgeSO2PsUS7MYzhdJzJBrp2GpvyYAEGUi/+QzdJl88zZ+lXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHwvPtgtYLMd/QBypNNDAeU+My4rIHtQ92mH1VPaeG8CAiEAu0GGakIWWiY17dxL5gcN0MXxXFnvmwTgbXwX5rIAAlU="}]},"maintainers":[{"name":"jmaurel","email":"fake@donotemail.me"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/js-storage-1.0.1.tgz_1475075635975_0.29508457449264824"},"directories":{}},"1.0.3":{"name":"js-storage","version":"1.0.3","author":{"name":"Julien Maurel","url":"https://github.com/julien-maurel"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.php"}],"devDependencies":{"gulp":"3.9.1","gulp-uglify":"1.5.3","gulp-rename":"1.2.2"},"description":"Plugin that simplify access to storages (HTML5) & cookies, add namespace storage and provide compatiblity for old browsers","keywords":["storage","html5","localStorage","sessionStorage","cookie","namespace"],"homepage":"https://github.com/julien-maurel/js-storage","bugs":{"url":"https://github.com/julien-maurel/js-storage/issues"},"repository":{"type":"git","url":"git+https://github.com/julien-maurel/js-storage.git"},"main":"./js.storage.js","gitHead":"99eba675999de7a75cd0c38ff898916b5c185b97","_id":"js-storage@1.0.3","scripts":{},"_shasum":"0efd75d3f75352d71e002a53e72e57a3ef59b94d","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"jmaurel","email":"fake@donotemail.me"},"dist":{"shasum":"0efd75d3f75352d71e002a53e72e57a3ef59b94d","tarball":"https://registry.npmjs.org/js-storage/-/js-storage-1.0.3.tgz","integrity":"sha512-QEQW/gVTO3su47q+sYPXvxVdbASep9iLLljBBVxinphkC5SeGZJRBUeVkjYa8YOYvMljupVLTbp5zbx2T/bknw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuEs6BoczBk5cb50hTDn5Ut32H0HnDsLPXQyHWQ8snLwIhAMnfzNMkkNwOlWxBu3D2y8fa4a5Za/GQq1QSDDhDR/fC"}]},"maintainers":[{"name":"jmaurel","email":"fake@donotemail.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-storage-1.0.3.tgz_1510906567913_0.30259741051122546"},"directories":{}},"1.0.4":{"name":"js-storage","version":"1.0.4","author":{"name":"Julien Maurel","url":"https://github.com/julien-maurel"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.php"}],"devDependencies":{"gulp":"3.9.1","gulp-uglify":"1.5.3","gulp-rename":"1.2.2"},"description":"Plugin that simplify access to storages (HTML5) & cookies, add namespace storage and provide compatiblity for old browsers","keywords":["storage","html5","localStorage","sessionStorage","cookie","namespace"],"homepage":"https://github.com/julien-maurel/js-storage","bugs":{"url":"https://github.com/julien-maurel/js-storage/issues"},"repository":{"type":"git","url":"git+https://github.com/julien-maurel/js-storage.git"},"main":"./js.storage.js","gitHead":"2f0527addb2d5e170afb6435743fefdf75cb8884","_id":"js-storage@1.0.4","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"jmaurel","email":"fake@donotemail.me"},"dist":{"integrity":"sha512-ND6iVfDo5r2PSpkzXa+s+S6TzZkRD1EaN4NvtwRWp2rrL1pmS9wdcbmv3eYZYOkBcPiQjyQUWZRcT0aQ4Wuk8g==","shasum":"3bacf5bc694825aef79e1c38e96569bfb8209f16","tarball":"https://registry.npmjs.org/js-storage/-/js-storage-1.0.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEyK+0Kh8Y3rddalWITkZBiLNf4mi+RfsVE3Tb8naWcYAiBk8DC+/Pfh+51e+2OM7gq6CXvuFOq8xveB4OQNyAjebQ=="}]},"maintainers":[{"name":"jmaurel","email":"fake@donotemail.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-storage-1.0.4.tgz_1511249903111_0.421664486406371"},"directories":{}},"1.1.0":{"name":"js-storage","version":"1.1.0","author":{"name":"Julien Maurel","url":"https://github.com/julien-maurel"},"licenses":[{"type":"MIT","url":"http://www.opensource.org/licenses/mit-license.php"}],"devDependencies":{"gulp":"3.9.1","gulp-uglify":"1.5.3","gulp-rename":"1.2.2"},"description":"Plugin that simplify access to storages (HTML5) & cookies, add namespace storage and provide compatiblity for old browsers","keywords":["storage","html5","localStorage","sessionStorage","cookie","namespace"],"homepage":"https://github.com/julien-maurel/js-storage","bugs":{"url":"https://github.com/julien-maurel/js-storage/issues"},"repository":{"type":"git","url":"git+https://github.com/julien-maurel/js-storage.git"},"main":"./js.storage.js","gitHead":"f5c584afb0e74833bdb378abc8c1eaf77a819d56","_id":"js-storage@1.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.15.1","_npmUser":{"name":"jmaurel","email":"fake@donotemail.me"},"dist":{"integrity":"sha512-XwkyTB3cjwBSaaKo+edR/n8ZbmX/mj5lJpW/O753NYvMpClQeurucceIvX3HeF4ZTTY2YRPXTVzgPByK4pA7aQ==","shasum":"357c9364ee39dcb6a81b4505c5926ac92871ecee","tarball":"https://registry.npmjs.org/js-storage/-/js-storage-1.1.0.tgz","fileCount":14,"unpackedSize":173983,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXVs4CRA9TVsSAnZWagAAdjoP/17Ft+XuNCnbv+eJJkzy\nOqANmsq4G4AAeUMWP0mQesChabIa39fIbmMdj62F/rW9snC9zsXzwYUPtLLL\n8h8vYawsQUKewJMEKWRQfB1a0QKnSaYHsgpmUBckJZ9/C01UCIZpILtjIXDA\nRL50Ffm1oLPv/QPiwRIOVFrwWneeZs/9NGFTA6mbd55IJuOyENmmRAilyoew\nVGmyNTd1d4uB60/oO1f70oytkg0PwBg57psw8AMZTx87TwIsFGk9fowp5nQH\nwdfOIMnQ9YDAG3YteCUR98Kupsr5PJy88P+p6Q5/2bH0RrDBl4OJGIYjgzNI\nv1k1GS5tgspAqMtLVyTstz9rmhwL+Pswpp54OFiKzj9+RjiHHUFN4YVW6DBE\ntQmd+0nhYQ45X0RIixdvNe435Q75DJ+hkn52oI/RV2UZZ3Y/5MEOBTg+jXcc\nQe59cQtQrXFgNbD0aYztUkcrR8A+/2yJjFfvXvZdldkA7ITev5MZao926bJ0\nvqGWshsAbmoZfp8u/TnYUPUOCRVfIWDTIqGIP31lEnq5RoatnF3/yQHrAwQy\nIvpGXdFLYXBBOmFztV/EolweUZZo9VA0QTZUlARVVfteIoNVzLhempjpUcPx\nP4oKMfnCtTDI0fdk5ifC0YI6FHEf07qo3JE7NJQx0nfmqtF8DjezE6ef2Xdl\n1A3r\r\n=yLBd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVynUpWM7DQ7yCLQTTXVC/FH4115hfzlzYa32oCHkunQIhALvWrP3uq7AoivNxsKRyKAlbI05JPGzUHEqoE+wf/FNJ"}]},"maintainers":[{"name":"jmaurel","email":"fake@donotemail.me"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/js-storage_1.1.0_1566399287655_0.2160823075706526"},"_hasShrinkwrap":false}},"readme":"JS Storage\n==========\n\nJS Storage is a plugin that simplifies access to storages (HTML5), cookies, and namespace storage functionality and provides compatiblity for old browsers with cookies!\n\nFunctionalities:\n* To store object easily, encode/decode it with JSON automatically\n* Ability to define namespace and use it as a specific storage\n* Magic getter and setter to have access at an infinite object level with one call\n* Add js-cookie (https://github.com/js-cookie/js-cookie) and manage your cookies with this API\n\n\nStorages\n--------\n\n#### Local storage\n    Storages.localStorage\n\n#### Session storage\n    Storages.sessionStorage\n\n#### Cookie storage (only if js-cookie added)\n    Storages.cookieStorage\n\n#### Namespace storage\n\n    ns=Storages.initNamespaceStorage('ns_name');\n    ns.localStorage // Namespace in localStorage\n    ns.sessionStorage // Namespace in sessionStorage\n    ns.cookieStorage // Namespace in cookieStorage (only if js-cookie added)\n\nPublic methods on storage\n-------------------------\n\nPublic methods are usable on all storage objects (Storages.localStorage, Storages.sessionStorage, Storages.cookieStorage or object returned by Storages.initNamespaceStorage)\n\n    storage=Storages.localStorage\n\n### `get()`\nGet an item from a storage.  \nIf last argument is an array (can be preceded by other arguments to parse storage), get() returns an object with value for each item of this array.\n\n    storage.get('foo') // Return storage.foo\n    storage.get('foo.foo2.foo3...') // Return storage.foo.foo2.foo3...\n    storage.get('foo','foo2','foo3'...) // Return storage.foo.foo2.foo3...\n    storage.get(['foo','foo2']) // Return {foo:storage.foo,foo2:storage.foo2}\n\n### `set()`\nSet an item in a storage.  \nIf argument is an object, set() sets value on storage for each property of this object.\n\n    storage.set('foo','value') // Set storage.foo to \"value\"\n    storage.set('foo.foo2.foo3...','value') // Set storage.foo.foo2.foo3... to \"value\"\n    storage.set('foo','foo2','foo3'...,'value') // Set storage.foo.foo2.foo3... to \"value\"\n    storage.set({'foo':'value','foo2':'value2'}) // Set storage.foo to \"value\" and storage.foo2 to \"value2\"\n\n### `keys()`\nGet keys of a storage or an item in a storage.\n\n    storage.set('foo','value')\n    storage.set('foo2','foo3'..., {'foo4':'value4','foo5':'value5'})\n    storage.keys() // Return keys of storage ([\"foo\", \"foo2\"])\n    storage.keys('foo2') // Return keys of storage.foo2 ([\"foo3\"])\n    storage.keys('foo2.foo3...') // Return keys of storage.foo2.foo3... ([\"foo4\", \"foo5\"])\n    storage.keys('foo2','foo3'...) // Return keys of storage.foo2.foo3... ([\"foo4\", \"foo5\"])\n\n### `isEmpty()`\nCheck if a storage or an item in a storage is empty (if equal to \"\", 0, null, undefined, [] or {}).  \nIf last argument is an array (can be preceded by other arguments to parse storage), isEmpty() tests storage for each item of this array, and returns true only if all tests return true.\n\n    storage.set('foo','value')\n    storage.set('foo2','foo3'..., {'foo4':'value4','foo5':'value5'})\n    storage.set('foo6','')\n    storage.set('foo7',{})\n    storage.isEmpty('foo') // Check if storage.foo is empty (false)\n    storage.isEmpty('foo6') // Check if storage.foo6 is empty (true)\n    storage.isEmpty('foo7') // Check if storage.foo7 is empty (true)\n    storage.isEmpty('foo2.foo3...') // Check if storage.foo2.foo3... is empty (false)\n    storage.isEmpty('foo2','foo3'...) // Check if storage.foo2.foo3... is empty (false)\n    storage.isEmpty(['foo','foo2']) // Check if storage.foo and storage.foo2 are empty (false)\n    storage.isEmpty(['foo','foo7']) // Check if storage.foo and storage.foo7 are empty (false)\n    storage.isEmpty(['foo6','foo7']) // Check if storage.foo6 and storage.foo7 are empty (true)\n    storage.isEmpty('foo2','foo3'...,['foo6','foo7']) // Check if storage.foo2.foo3...foo6 and storage.foo2.foo3...foo7 are empty (true)\n\n### `isSet()`\nCheck if an item exists in a storage (if not null or undefined).  \nIf last argument is an array (can be preceded by other arguments to parse storage), isSet() tests storage for each item of this array, and returns true only if all test return true.\n\n    storage.set('foo','value')\n    storage.set('foo2','foo3'..., {'foo4':'value4','foo5':'value5'})\n    storage.set('foo6','')\n    storage.isSet('foo') // Check if storage.foo exists (true)\n    storage.isSet('foo6') // Check if storage.foo6 exists (true)\n    storage.isSet('foo7') // Check if storage.foo7 exists (false)\n    storage.isSet('foo2.foo3'...) // Check if storage.foo2.foo3... exists (true)\n    storage.isSet('foo2','foo3'...) // Check if storage.foo2.foo3... exists (true)\n    storage.isSet(['foo','foo2']) // Check if storage.foo and storage.foo2 exist (true)\n    storage.isSet(['foo','foo7']) // Check if storage.foo and storage.foo7 exist (false)\n    storage.isSet('foo2','foo3'...,['foo6','foo7']) // Check if storage.foo2.foo3...foo6 and storage.foo2.foo3...foo7 exist (false)\n\n### `remove()`\nDelete an item from a storage.  \nIf last argument is an array (can be preceded by other arguments to parse storage), remove() removes value of storage for each item of this array.\n\n    storage.remove('foo') // Delete storage.foo\n    storage.remove('foo.foo2.foo3'...) // Delete storage.foo.foo2.foo3...\n    storage.remove('foo','foo2','foo3'...) // Delete storage.foo.foo2.foo3...\n    storage.remove(['foo','foo2']) // Delete storage.foo and storage.foo2\n\n### `removeAll()`\nTruncate the storage\n\n    storage.removeAll() // Delete all items from the storage\n    storage.removeAll(true) // Only on global storages. Delete all items from the storage and reinitialize previously initialized namespaces\n\n### `setExpires()`\nOnly on cookieStorage.  \nSets expires date in days (default value is null, cookie is valid for session only; only cookies set after setExpires() call will be affected).\n\n    storage.setExpires(10) // Set expiry date to today + 10 days\n\nThis method returns the storage object, so you can:\n\n    storage.setExpires(10).set('foo','value') // Set expiry date to today + 10 days and set a new cookie\n\n### `setPath()`\nOnly on cookieStorage.  \nSets path for cookies (default value is null; only cookies set after setPath() call will be affected).\n\n    storage.setPath('/') // Set path to '/'\n\nThis method return the storage object, so you can:\n\n    storage.setPath('/').set('foo','value') // Set path to '/' and set a new cookie\n\n### `setDomain()`\nOnly on cookieStorage.  \nSets domain for cookies (default value is null; only cookies set after setDomain() call will be affected).\n\n    storage.setDomain('www.ndd.com') // Set domain to www.ndd.com\n\nThis method return the storage object, so you can:\n\n    storage.setDomain('www.ndd.com').set('foo','value') // Set domain to www.ndd.com and set a new cookie\n\n### `setSecure()`\nOnly on cookieStorage.  \nSets secure flag for cookies (default value is false; only cookies set after setSecure() call will be affected).\n\n    storage.setSecure(true) // Set secure flag to true\n\nThis method return the storage object, so you can:\n\n    storage.setSecure(true).set('foo','value') // Set secure flag to true and set a new cookie\n\n### `setConf()`\nOnly on cookieStorage.  \nSets cookie configuration with an object (only cookies set after setConf() call will be affected).\n\n    storage.setConf({path:'/',expires:10,'domain':'www.ndd.com'}) // Set expiry date, domain and path\n\nThis method return the storage object, so you can:\n\n    storage.setConf({path:'/',expires:10}).set('foo','value') // Set configuration and set a new cookie\n\n### `setDefaultConf()`\nOnly on cookieStorage.  \nSets default configuration (only cookies set after setDefaultConf() call will be affected).\n\n    storage.setDefaultConf() // Set path, domain and expiry date to null\n\nThis method return the storage object, so you can:\n\n    storage.setDefaultConf().set('foo','value') // Set default configuration and set a new cookie\n\n### `Storages.namespaceStorages`\nObject that contains all initilialized namespace storages.\n\n### `Storages.removeAllStorages()`\nDelete all items of all storages.  \nAs removeAll(), if first argument given is set to true, namespaces are reinitialized.  \nElse, Storages.namespaceStorages is set to an empty object and previous namespaces are lost.\n\n### `Storages.alwaysUseJsonInStorage()`\nBy default, basic values (string, int...) are always stored as string in html5 storages.\n\n    window.localStorage.setItem('foo', 1);\n    window.localStorage.getItem('foo'); // Return \"1\"\n\nSo by default, if you do equivalent with the plugin, there will be the same behavior.\n\n    Storages.localStorage.set('foo', 1);\n    Storages.localStorage.get('foo'); // Return \"1\"\n    \nThis is the case only if you store basic values in the root of the storage.  \nIn others cases, plugin use JSON to store values.\n\n    Storages.localStorage.set('foo.foo2', 1);\n    Storages.localStorage.get('foo.foo2'); // Return 1\n    window.localStorage.getItem('foo'); // Return \"{\"foo2\":1}\"\n\nIf you want to be able to store typed values even on the root of the storages, call `Storages.alwaysUseJsonInStorage(true)`\n\n    Storages.alwaysUseJsonInStorage(true);\n    \n    Storages.localStorage.set('foo', 1);\n    Storages.localStorage.get('foo'); // Return 1\n    window.localStorage.getItem('foo'); // Return \"1\"\n\n    Storages.localStorage.set('foo', '1');\n    Storages.localStorage.get('foo'); // Return \"1\"\n    window.localStorage.getItem('foo'); // Return \"\"1\"\", because value is JSON encoded\n\n\nCompatibility\n-------------\n\nJS Storage is compatible with all browsers that support storage and JSON natively (so all recents browsers) except IE8.\n","maintainers":[{"name":"jmaurel","email":"fake@donotemail.me"}],"time":{"modified":"2022-06-19T05:44:02.588Z","created":"2016-09-28T12:24:31.050Z","1.0.0":"2016-09-28T12:24:31.050Z","1.0.1":"2016-09-28T15:13:56.711Z","1.0.3":"2017-11-17T08:16:09.267Z","1.0.4":"2017-11-21T07:38:24.261Z","1.1.0":"2019-08-21T14:54:47.742Z"},"homepage":"https://github.com/julien-maurel/js-storage","keywords":["storage","html5","localStorage","sessionStorage","cookie","namespace"],"repository":{"type":"git","url":"git+https://github.com/julien-maurel/js-storage.git"},"author":{"name":"Julien Maurel","url":"https://github.com/julien-maurel"},"bugs":{"url":"https://github.com/julien-maurel/js-storage/issues"},"readmeFilename":"README.md","users":{"h4ck3rm1k3":true}}