{"name":"humble-localstorage","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/","test":"npm run jshint && npm run test-unit && npm run test-e2e","test-e2e":"testmate test/*.js","test-unit":"mocha test/unit","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"git+https://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":"^11.0.1","chai":"^3.2.0","derequire":"^2.0.2","doxx":"^1.5.0","expect.js":"^0.3.1","gh-pages-deploy":"^0.3.0","jshint":"^2.8.0","mocha":"^2.3.0","sinon":"^1.16.1","testmate":"^1.0.1","uglify-js":"^2.4.24","semantic-release":"^4.3.4"},"dependencies":{"has-localstorage":"^1.0.1","localstorage-memory":"^1.0.1"},"gh-pages-deploy":{"staticpath":"docs","noprompt":true},"version":"1.4.2","gitHead":"e222415961ad6dfad5a8b875e4a9b80ea7bc1f02","_id":"humble-localstorage@1.4.2","_shasum":"d05ab0d526c4edbddbf7c6a60df6ff5805283469","_from":".","_npmVersion":"2.14.1","_nodeVersion":"0.10.40","_npmUser":{"name":"gr2m","email":"gregor@martynus.net"},"dist":{"shasum":"d05ab0d526c4edbddbf7c6a60df6ff5805283469","tarball":"http://registry-npm.ywwl.com/humble-localstorage/download/humble-localstorage-1.4.2.tgz","integrity":"sha512-INHaIq55BGlrVCSYw11FxRHQAAQVBO5i1t8kREy778DLMVrgaASCujBwZa2e2+n70sUczlBu5Tjie5iYp1JVeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6Kaaq9VgH2m/z92wtbc7YKDMChdiQPN42lo1VlmT+BAIgOaiyi9TukqxE76FjbkGP1YN9lypEGgOV3OfKrpYgotY="}],"size":12740,"noattachment":false,"key":"/humble-localstorage/-/humble-localstorage-1.4.2.tgz"},"maintainers":[{"name":"gr2m","email":"gregor@martynus.net"}],"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":1441209086232,"_cnpm_publish_time":1441209086232,"dist-tags":{"latest":"2.0.0"}}