Simple storage wrapper for the browser

Storage wrap

Nothing fancy, just a simple wrapper for local/sessionStorage that removes the need to keep parsing and stringifying objects.

Bower ftw

bower install storage-wrap --save

It uses exactly the same API as the native Storage objects except it will try to JSON.parse objects and arrays.

// Saves as - "{"foo":"bar"}" 
storageWrap.setItem('test', {
    foo: 'bar'  
// Returns an object 

It uses localStorage by default, but it can easily be changed with setAdaptor


Use it as a global or as an AMD module.

npm install
grunt test