any-storage
v0.2.1
Published
Use any possible storage mechanism available asynchronously
Downloads
3
Maintainers
Readme
any-storage
Use any possible storage mechanism available asynchronously.
Supports local storage, chrome storage, or in-memory storage.
Installation
npm install --save any-storage
Usage
var storage = require('any-storage');
// set
storage.set('someKey', 'value', function (err) {
});
storage.set({
'anotherKey': 'indeed'
}, function (err) {
});
// get
storage.get('someKey', function (err, value) {
});
storage.get(['someKey', 'anotherKey'], function (err, value) {
// value => {someKey: data, anotherKey: otherData }
});
// remove
storage.remove('someKey', function (err) {});
storage.remove(['someKey', 'anotherKey'], function (err) {
});
Contributing
Could definite use some test cases, mostly relies on just-storage
License
MIT