Update README.md

This commit is contained in:
AJ ONeal 2014-02-03 15:08:54 -06:00
parent 6f7b83ea15
commit c4efbba4da
1 changed files with 5 additions and 3 deletions

View File

@ -43,9 +43,11 @@ you may wish to pass the `{ stringify: false }` option to prevent double stringi
API
===
* `JsonStorage.create(DOMStorage, namespace)`
* `DOMStorage` should be globalStorage, sessionStorage, or localStorage
* `namespace` is optional string which allows multiple non-conflicting storage containers
* `JsonStorage.create(DOMStorage, namespace, opts)`
* `DOMStorage` should be globalStorage, sessionStorage, or localStorage. Defaults to window.localStorage if set to `null`.
* `namespace` is optional string which allows multiple non-conflicting storage containers. Use `null` if you want opts but not a namespace
* `opts`
* `stringify` set to `false` in `node` to avoid double stringifying
* `store.get(key)`
* `store.set(key, value)`
* `store.remove(key)`