|
%!s(int64=2) %!d(string=hai) anos | |
---|---|---|
.. | ||
dist | %!s(int64=2) %!d(string=hai) anos | |
examples | %!s(int64=2) %!d(string=hai) anos | |
lib | %!s(int64=2) %!d(string=hai) anos | |
test | %!s(int64=2) %!d(string=hai) anos | |
typing-tests | %!s(int64=2) %!d(string=hai) anos | |
typings | %!s(int64=2) %!d(string=hai) anos | |
.babelrc | %!s(int64=2) %!d(string=hai) anos | |
.eslintrc | %!s(int64=2) %!d(string=hai) anos | |
.jscsrc | %!s(int64=2) %!d(string=hai) anos | |
.jshintrc | %!s(int64=2) %!d(string=hai) anos | |
.travis.yml | %!s(int64=2) %!d(string=hai) anos | |
LICENSE | %!s(int64=2) %!d(string=hai) anos | |
README.md | %!s(int64=2) %!d(string=hai) anos | |
bower.json | %!s(int64=2) %!d(string=hai) anos | |
package.json | %!s(int64=2) %!d(string=hai) anos | |
rollup.config.es6.js | %!s(int64=2) %!d(string=hai) anos | |
rollup.config.js | %!s(int64=2) %!d(string=hai) anos | |
rollup.config.test.js | %!s(int64=2) %!d(string=hai) anos | |
rollup.config.umd.js | %!s(int64=2) %!d(string=hai) anos |
Adds getItems method to localForage.
npm i localforage-getitems
Just like getItem()
but you can pass an array with the keys that need to be retrieved.
var keys = ['asdf','asap','async'];
localforage.getItems(keys).then(function(results) {
console.log(results);
// prints:
// {
// asdf: 'asdf value!',
// asap: 'asap value!',
// async: 'async value!'
// }
console.log(results.asdf);
console.log(results['asdf']);
console.log(results[keys[0]]);
// all the above print 'asdf value!'
});
Invoking getItems()
without arguments (or with null
as the first argument) will retrieve all the items of the current driver instance.
localforage.getItems().then(function(results) { });
// or by using callbacks
localforage.getItems(null, function(results) { });