Skip to content

dongshaohan/store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

store

A better way to use localStorage.

Download: store.min.js or store.js

##Documentation the api of store like so:

store.set(key, data); // sets stringified data under key
store.setAll(data);   // sets all key/data pairs in the object
store.get(key);       // gets and parses data stored under key
store.getAll();       // gets all stored key/data pairs as an object 
store.clear();        // removes all data
store.has(key);       // returns true or false
store.remove(key);    // removes key and its data
store.each(callback); // called with key and data args, return false to exit early
store.keys();         // returns array of keys
store.size();         // returns number of keys;

About

use localStorage quickly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published