Remember user preferences via LocalStorage
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.npmignore
README.md
index.js
package.json
test.js

README.md

pref

Remember user preferences via LocalStorage

pref = require('pref')

pref('show-toolbar', false)
pref('show-toolbar')
// => false

pref('foobar', { foo: 123, bar: 456 })
pref('foobar')
// => { foo: 123, bar: 456 }

Install

$ npm install pref