Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

localforage-getitems

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

localforage-getitems

Adds getItems method to localForage.

  • 1.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
increased by5.82%
Maintainers
1
Weekly downloads
 
Created
Source

localForage-getItems

npm
Adds getItems method to localForage.

Requirements

  • localForage v1.4.0+
    • for earlier versions of localforage, please use the v1.1.x releases

Installation

npm i localforage-getitems

API

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) { });

Keywords

FAQs

Package last updated on 12 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc