{"_id":"capped-local-storage","_rev":"26-f7bc2005fa247d9f4dd5915311716bfc","name":"capped-local-storage","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.1":{"name":"capped-local-storage","version":"1.0.1","keywords":["local","storage","prune","remove","delete"],"author":{"name":"Collaborne","email":"info@collaborne.com"},"license":"MIT","_id":"capped-local-storage@1.0.1","maintainers":[{"name":"ronnyroeller","email":"npm@collaborne.com"}],"homepage":"https://github.com/Collaborne/capped-local-storage#readme","bugs":{"url":"https://github.com/Collaborne/capped-local-storage/issues"},"dist":{"shasum":"e539ce678220030aa9e7eabaecb35eff8d93f842","tarball":"https://registry.npmjs.org/capped-local-storage/-/capped-local-storage-1.0.1.tgz","integrity":"sha512-3HUt2dCIZW19LFhEPdQKnwYAvT90cIKR/UgZvyEJzJNCOLQ0+cA4fwEYATBVuqp2OrRQ4XUzqwcpREcKCy9J3A==","signatures":[{"sig":"MEUCIQCPvsCZ392fFfANe+VGxEmbMe9YqSSRUXCXD2gCOUlE2AIgJsWUGrXir8ncPhB1lY/MabtOWGMqhwrI66iQChgqGig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/index.js","_from":".","files":["demo.html","dist","lib"],"_shasum":"e539ce678220030aa9e7eabaecb35eff8d93f842","gitHead":"c278a3e83345b2e83f599d0785fe8ecd15f3584b","scripts":{"lint":"eslint lib","build":"npm run build-dist && npm run build-min","compile":"babel --presets es2015 -d lib/ src/","build-min":"uglifyjs dist/capped-local-storage.js --comments -o dist/capped-local-storage.min.js","build-dist":"mkdir -p dist && browserify -r $npm_package_main:capped-local-storage > dist/capped-local-storage.js","prepublish":"npm run build"},"_npmUser":{"name":"ronnyroeller","email":"npm@collaborne.com"},"repository":{"url":"git+https://github.com/Collaborne/capped-local-storage.git","type":"git"},"_npmVersion":"3.10.3","description":"Local storage access layer that allows to remove the oldest entries","directories":{},"_nodeVersion":"6.6.0","devDependencies":{"eslint":"^2.13.1","expect":"1.14.0","uglify-js":"2.6.2","browserify":"~11.1.0","babel-preset-es2015":"^6.18.0","eslint-config-flickr":"~1.1.8"},"_npmOperationalInternal":{"tmp":"tmp/capped-local-storage-1.0.1.tgz_1482485948331_0.08895054995082319","host":"packages-12-west.internal.npmjs.com"}},"1.0.2":{"name":"capped-local-storage","version":"1.0.2","keywords":["local","storage","prune","remove","delete"],"author":{"name":"Collaborne","email":"info@collaborne.com"},"license":"MIT","_id":"capped-local-storage@1.0.2","maintainers":[{"name":"ronnyroeller","email":"npm@collaborne.com"}],"homepage":"https://github.com/Collaborne/capped-local-storage#readme","bugs":{"url":"https://github.com/Collaborne/capped-local-storage/issues"},"dist":{"shasum":"df3d0c394d12079f5860303c6c851434c284bef4","tarball":"https://registry.npmjs.org/capped-local-storage/-/capped-local-storage-1.0.2.tgz","integrity":"sha512-JZE9wJwhE4P/JQTyNzIURaLsiGhmbY1vyF5oOfAJfXgReTf6f/ADBtiteEGLXhupzCbRS6LTR9xH2jy3gq0v7A==","signatures":[{"sig":"MEQCIFZO1u16yJK5wkYfnO1u1UAFfGJ0y3YIRSVrTVgCGlysAiA2xCdSn0Qh/qZ9qQAI30TepZvX7pxXPl0M+tJqCD55LQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/index.js","_from":".","files":["demo.html","dist","lib"],"_shasum":"df3d0c394d12079f5860303c6c851434c284bef4","gitHead":"c4f385ea493d2aa0c12b5ac7a247691f1d30471b","scripts":{"lint":"eslint lib","build":"npm run build-dist && npm run build-min","compile":"babel --presets es2015 -d lib/ src/","build-min":"uglifyjs dist/capped-local-storage.js --comments -o dist/capped-local-storage.min.js","build-dist":"mkdir -p dist && browserify -r $npm_package_main:capped-local-storage > dist/capped-local-storage.js","prepublish":"npm run compile && npm run build"},"_npmUser":{"name":"ronnyroeller","email":"npm@collaborne.com"},"repository":{"url":"git+https://github.com/Collaborne/capped-local-storage.git","type":"git"},"_npmVersion":"3.10.3","description":"Local storage access layer that allows to remove the oldest entries","directories":{},"_nodeVersion":"6.6.0","devDependencies":{"eslint":"^2.13.1","expect":"1.14.0","babel-cli":"^6.18.0","uglify-js":"2.6.2","browserify":"~11.1.0","babel-preset-es2015":"^6.18.0","eslint-config-flickr":"~1.1.8"},"_npmOperationalInternal":{"tmp":"tmp/capped-local-storage-1.0.2.tgz_1482486570030_0.9209025781601667","host":"packages-12-west.internal.npmjs.com"}},"1.1.0":{"name":"capped-local-storage","version":"1.1.0","keywords":["local","storage","prune","remove","delete"],"author":{"name":"Collaborne","email":"info@collaborne.com"},"license":"MIT","_id":"capped-local-storage@1.1.0","maintainers":[{"name":"ronnyroeller","email":"npm@collaborne.com"}],"homepage":"https://github.com/Collaborne/capped-local-storage#readme","bugs":{"url":"https://github.com/Collaborne/capped-local-storage/issues"},"dist":{"shasum":"91d276255233b04101f983d000eb8effd630008f","tarball":"https://registry.npmjs.org/capped-local-storage/-/capped-local-storage-1.1.0.tgz","integrity":"sha512-JZGuPisQSnr/i6y1RzQFPxI7+UGZ2J7fDgcDAtXxYmawyWbS1GCvLRXYPuh6/j6ibeY1NzYX67u/Es5J/LqUbQ==","signatures":[{"sig":"MEUCIQD0naREoV+/wXr1jU9xGBZbEHuIAVrR5oGXlTYCOdoEtAIgJkm7S+h4nzQqbEWM6vIEWbh9u7TFI9BKyQOgkPM4Dq0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/index.js","_from":".","files":["demo.html","dist","lib"],"_shasum":"91d276255233b04101f983d000eb8effd630008f","gitHead":"30241380ab17051fd55e2e2ecbcfe7c9ecc816fc","scripts":{"lint":"eslint lib","build":"npm run build-dist && npm run build-min","compile":"babel --presets es2015 -d lib/ src/","build-min":"uglifyjs dist/capped-local-storage.js --comments -o dist/capped-local-storage.min.js","build-dist":"mkdir -p dist && browserify -r $npm_package_main:capped-local-storage > dist/capped-local-storage.js","prepublish":"npm run compile && npm run build"},"_npmUser":{"name":"ronnyroeller","email":"npm@collaborne.com"},"repository":{"url":"git+https://github.com/Collaborne/capped-local-storage.git","type":"git"},"_npmVersion":"3.10.9","description":"Local storage access layer that allows to remove the oldest entries","directories":{},"_nodeVersion":"6.9.2","devDependencies":{"eslint":"^2.13.1","expect":"1.14.0","babel-cli":"^6.18.0","uglify-js":"2.6.2","browserify":"~11.1.0","babel-preset-es2015":"^6.18.0","eslint-config-flickr":"~1.1.8"},"_npmOperationalInternal":{"tmp":"tmp/capped-local-storage-1.1.0.tgz_1483541974408_0.7551008032169193","host":"packages-12-west.internal.npmjs.com"}},"1.1.1":{"name":"capped-local-storage","version":"1.1.1","keywords":["local","storage","prune","remove","delete"],"author":{"name":"Collaborne","email":"info@collaborne.com"},"license":"MIT","_id":"capped-local-storage@1.1.1","maintainers":[{"name":"ankon","email":"andreas.kohn@gmail.com"},{"name":"cminardi","email":"claudia.minardi@collaborne.com"},{"name":"collaborne-team","email":"npm@collaborne.com"},{"name":"ronnyroeller","email":"ronny.roeller@collaborne.com"}],"homepage":"https://github.com/Collaborne/capped-local-storage#readme","bugs":{"url":"https://github.com/Collaborne/capped-local-storage/issues"},"dist":{"shasum":"b3a27eb2c46552a5245a9cb3c5c662455cd06e52","tarball":"https://registry.npmjs.org/capped-local-storage/-/capped-local-storage-1.1.1.tgz","fileCount":7,"integrity":"sha512-P7nyXhiyh0SwtsYY2F+Hu37OJ33whZT2C0c2kzS4U/I3Up1x5GpLvzLBEdyM0Iaxvgp/rUul5nSLUYEfahMxog==","signatures":[{"sig":"MEUCIHNsRIKgNaoQPgNE976oh/QrOVzaiacEPFdt0DbqqgADAiEAuk7wxvTzDDllPPshC88IRa0ghjlhhWOz157dQXSZb1o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9S00CRA9TVsSAnZWagAAz6wP/R3HoLU8VD3OX8N9cwvf\nMMgqIhKHaJZ26atxibXMRX84YuBFqL2FrQFhTzgANwLDLfRFGgLRomF94K4s\nGwzuwVhf2fupTyAkoC3Hu3Jc+B/SEboSYlcKDpKSZFnDAUIUL5divkICeUVw\nZnejNl2aMZrKO31eFN/ckPgpnVg9up9b80TUxlj4tsbBDsi07u4z7di5KzYr\n6phqRPw+9R46BQAp7q5VL2L5yZqVHVsu/1hlTuFGLCIrJKP5R1cE9xEYSPwX\nG8iTg6iRZwClDaa85MGTHzxUVyEePD6FfZbJ2QYLJZ0ZxUNMICWM6SJGtdiR\nwsjaDVpXth162Kgl69loWWL4C3l27ztL8amWNrlQHPVfHdgLYlgiSRES9RUR\njCPS4G/4bPJwwX4xAIOaDcR8ss2IrTRxqi9HTbBNSAEf+9dE3nNywteU9p06\nMRcSvuBTvKLmQ6HSMhaKad0cUWtNww3LWC0FGWLaWsXL9JK6b0/Q6c18sPiD\nIhDR5jNgJJsJyEGi8+R0w3fvrf9m+g8z/1tfHJgwaJMxrj0sMhQzy6TBk/9M\nfGOUJzQN52sqqS3UURm13BM+38yBVSgiicefFF169fouRMe9ponUqdYmfTm4\nP2RKdQppSiB0s1a+blufY5em5aPdC7AFP3LbntORNzlnUgIJcT1wWjetzLhP\nUj5I\r\n=gOc1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./lib/index.js","gitHead":"6efd32c08ae82352232d95eb04f3bf6405e90832","scripts":{"lint":"eslint src","test":"echo 'No tests defined'","build":"npm run build-dist && npm run build-min","compile":"babel --presets es2015 -d lib/ src/","build-min":"uglifyjs dist/capped-local-storage.js --comments -o dist/capped-local-storage.min.js","build-dist":"mkdir -p dist && browserify -r $npm_package_main:capped-local-storage > dist/capped-local-storage.js","prepublish":"npm run lint && npm run compile && npm run build"},"_npmUser":{"name":"collaborne-team","email":"npm@collaborne.com"},"repository":{"url":"git+https://github.com/Collaborne/capped-local-storage.git","type":"git"},"_npmVersion":"6.4.1","description":"Local storage access layer that allows to remove the oldest entries","directories":{},"_nodeVersion":"11.2.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.1.1","babel-cli":"^6.18.0","uglify-js":"^3.0.1","browserify":"~14.5.0","babel-preset-es2015":"^6.18.0"},"_npmOperationalInternal":{"tmp":"tmp/capped-local-storage_1.1.1_1542794547718_0.9090584703198283","host":"s3://npm-registry-packages"}}},"time":{"created":"2016-12-23T09:39:10.076Z","modified":"2025-08-16T08:40:41.372Z","1.0.1":"2016-12-23T09:39:10.076Z","1.0.2":"2016-12-23T09:49:32.076Z","1.1.0":"2017-01-04T14:59:36.344Z","1.1.1":"2018-11-21T10:02:27.879Z"},"bugs":{"url":"https://github.com/Collaborne/capped-local-storage/issues"},"author":{"name":"Collaborne","email":"info@collaborne.com"},"license":"MIT","homepage":"https://github.com/Collaborne/capped-local-storage#readme","keywords":["local","storage","prune","remove","delete"],"repository":{"url":"git+https://github.com/Collaborne/capped-local-storage.git","type":"git"},"description":"Local storage access layer that allows to remove the oldest entries","maintainers":[{"email":"ronny@nextapp.co","name":"ronnyroeller"},{"email":"npm@nextapp.co","name":"collaborne-team"},{"email":"sudhons@gmail.com","name":"sudhons"},{"email":"idriss.mahjoubi@nextapp.co","name":"idrissmahjoubi"}],"readme":"# capped-local-storage [![Build Status](https://travis-ci.org/Collaborne/capped-local-storage.svg?branch=master)](https://travis-ci.org/Collaborne/capped-local-storage) [![Greenkeeper badge](https://badges.greenkeeper.io/Collaborne/capped-local-storage.svg)](https://greenkeeper.io/)\n\nLocal storage access layer that allows to remove the oldest entries\n\n## Install\n\n~~~~\nnpm install capped-local-storage --save\n~~~~\n\n## Usage\n\nCheck the included [demo](https://github.com/Collaborne/capped-local-storage/blob/master/demo.html).\n\n### Prune old values\n\n```javascript\nvar storage = require('capped-local-storage');\n\nvar key = 'FOO';\nvar value = 'BAR';\n\nstorage.save(key, value).then(function() {\n    console.log('Step 1: Successfully saved ' + key + ' with value ' + value);\n}).then(function() {\n    console.log('Step 2: Reading value for ' + key + '...');\n    return storage.get(key);\n}).then(function(readValue) {\n    console.log('Step 3: Got \"' + readValue + '\"');\n}).then(function(readValue) {\n    console.log('Step 4: Pruning all values...');\n    return storage.prune([], 0);\n}).then(function() {\n    console.log('Step 5: Reading value for ' + key + '...');\n    return storage.get(key);\n}).then(function(readValue) {\n    console.log('Step 6: Got \"' + readValue + '\"');\n});\n```\n\n### Delete a value\n\n```javascript\nvar storage = require('capped-local-storage');\n\nvar key = 'FOO';\nvar value = 'BAR';\n\nstorage.save(key, value).then(function() {\n    console.log('Step 1: Successfully saved ' + key + ' with value ' + value);\n}).then(function() {\n    console.log('Step 2: Reading value for ' + key + '...');\n    return storage.get(key);\n}).then(function(readValue) {\n    console.log('Step 3: Got \"' + readValue + '\"');\n}).then(function(readValue) {\n    console.log('Step 4: Removing value...');\n    return storage.remove(key);\n}).then(function() {\n    console.log('Step 5: Reading value for ' + key + '...');\n    return storage.get(key);\n}).then(function(readValue) {\n    console.log('Step 6: Got \"' + readValue + '\"');\n});\n```\n","readmeFilename":"README.md"}