{"name":"humble-localstorage","version":"1.4.1","description":"wraps localStorage and adds .getObject(), .setObject(), .isPersistent","main":"lib/index.js","scripts":{"build":"browserify . -s humbleLocalStorage > dist/humble-localstorage.js && uglifyjs dist/humble-localstorage.js -mc > dist/humble-localstorage.min.js","wip-deploy":"gh-pages-deploy # https://github.com/meandavejustice/gh-pages-deploy/issues/5","predeploy":"git config user.name \"Travis-CI\" && git config user.email \"deploy@travis-ci.org\" && git remote add deploy \"https://${GH_TOKEN}@github.com/gr2m/humble-localstorage.git\" > /dev/null 2>&1","deploy":"git branch -f gh-pages && git checkout gh-pages && cp -r docs/* . && git reset --hard origin/master && git add -A . && git commit -a -m 'gh-pages update' && git push deploy gh-pages --force && git checkout master","dev-server":"http-server -a 127.0.0.1 -p 8000","docs":"doxx --source lib/ --target docs/ --template docs/template.jade --ignore index.js","jshint":"jshint -c .jshintrc lib/ test/","postpublish":"semantic-release post && npm run docs && npm run deploy","prepublish":"semantic-release pre","test":"npm run jshint && npm run test-unit && npm run test-e2e","test-e2e":"testmate test/*.js","test-unit":"mocha test/unit"},"repository":{"type":"git","url":"git://github.com/gr2m/humble-localstorage.git"},"keywords":["localstorage","browser","data"],"author":{"name":"Gregor Martynus"},"license":"MIT","bugs":{"url":"http://github.com/gr2m/humble-localstorage/issues"},"homepage":"http://gr2m.github.io/humble-localstorage/","devDependencies":{"browserify":"^8.0.3","chai":"^1.10.0","derequire":"^1.2.0","doxx":"^1.2.5","expect.js":"^0.3.1","gh-pages-deploy":"^0.2.0","jshint":"^2.5.11","mocha":"^2.1.0","semantic-release":"^3.0.1","sinon":"^1.12.2","testmate":"^1.0.1","uglify-js":"^2.4.16"},"dependencies":{"has-localstorage":"^1.0.0","localstorage-memory":"^1.0.0"},"gh-pages-deploy":{"staticpath":"docs","noprompt":true},"gitHead":"7d9303cc82ad84991e8bc3d09b912b58f5eb7f0d","_id":"humble-localstorage@1.4.1","_shasum":"b904486355117d8e7760429b30bb1146460375a0","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"gr2m","email":"gregor@martynus.net"},"maintainers":[{"name":"gr2m","email":"gregor@martynus.net"}],"dist":{"shasum":"b904486355117d8e7760429b30bb1146460375a0","tarball":"http://registry-npm.ywwl.com/humble-localstorage/download/humble-localstorage-1.4.1.tgz","integrity":"sha512-H6/IfbQYAuMqTV4lTXpoadWWm14CCiJEq1sAnvecvbU7brHqB6IQUKy3iZy43ndGSO0shu+85wbeRXje+pyHGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCC/cCxxrccJ7Ayaxh84HojYXMKAivj7ANPsDyf8q/4kQIhANrYO9hUQDidnk72DWUuPuRNAhITiMgqSoNiGrt1OCx3"}],"size":13899,"noattachment":false,"key":"/humble-localstorage/-/humble-localstorage-1.4.1.tgz"},"directories":{},"readme":"# humble-localstorage\n\n> wraps localStorage and adds .getObject(), .setObject(), .isPersistent\n\n[![Build Status](https://travis-ci.org/gr2m/humble-localstorage.png?branch=master)](https://travis-ci.org/gr2m/humble-localstorage/)\n[![Dependencies Status](https://david-dm.org/gr2m/humble-localstorage.svg)](https://david-dm.org/gr2m/humble-localstorage)\n[![devDependency Status](https://david-dm.org/gr2m/humble-localstorage/dev-status.svg)](https://david-dm.org/gr2m/humble-localstorage#info=devDependencies) [![Greenkeeper badge](https://badges.greenkeeper.io/gr2m/humble-localstorage.svg)](https://greenkeeper.io/)\n\n`localStorage` is a simple key/value store API for browsers, perfectly\nsuited to store little amount of data like configurations.\n\n`humbleLocalStorage` provides additional APIs to store / retrieve\nJSON objects, and also handles several circumstances in which Browsers\ndo not support or persist localStorage (e.g. private modes,\nCookies disabled, etc).\n\nIn case data cannot be persisted in localStorage,  `humbleLocalStorage`\nfalls back to in-memory storage. To determine if data is being persisted,\nuse `humbleLocalStorage.isPersistent` property.\n\n\n## Installation\n\n- Download: https://github.com/gr2m/humble-localstorage/releases\n- or: install via Bower: `bower install -S humble-localstorage`\n- or: install via npm: `npm install -S humble-localstorage`\n\n\n## Usage\n\n```js\nhumbleLocalStorage.getItem('mykey') // string value or null\nhumbleLocalStorage.setItem('mykey', 123) // stored as '123'\nhumbleLocalStorage.removeItem('mykey')\nhumbleLocalStorage.clear() // removes all data\nhumbleLocalStorage.key(0) // name of key by numeric index, or null\nhumbleLocalStorage.length // number of stored keys\n\nhumbleLocalStorage.getObject('mykey') // JSON value or null\nhumbleLocalStorage.setObject('mykey', {foo: 'bar'}) // stored as '{\"foo\": \"bar\"}'\nhumbleLocalStorage.isPersistent // true if data persists page reload, false if not\n```\n\n\n## Run tests\n\n```\n# see all available tasks\nnpm run\n\n# run unit & integration tests\n# note: selenium must be running\nnpm test\n```\n\n## License\n\nMIT\n","publish_time":1423520706561,"_cnpm_publish_time":1423520706561,"dist-tags":{"latest":"2.0.0"}}