Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/signpostmarv/localforage-silo

Wrapper to localForage for storing content in self-contained silo
https://github.com/signpostmarv/localforage-silo

Last synced: 5 days ago
JSON representation

Wrapper to localForage for storing content in self-contained silo

Awesome Lists containing this project

README

        

Wrapper to [localForage](https://github.com/mozilla/localForage) for storing
content in self-contained silo

# Example

```javascript
require([
'Silo.js',
'localforage'
], function(
Silo,
localforage
){
var
silo = new Silo('foo')
;
silo.setItem('bar', 'baz');
localforage.setItem('bar', 'baz');
silo.keys().then(function(keys){
console.log(keys); // will give ["bar"]
});
localforage.keys().then(function(keys){
console.log(keys); // will give ["bar", "foo::bar"]
});
silo.removeItem('bar');
localforage.keys().then(function(keys){
console.log(keys); // will give ["bar"]
});
})
```

# License

This program is free software; it is distributed under an [Apache License](
https://github.com/SignpostMarv/localForage-Silo/blob/master/LICENSE
).