Socket
Socket
Sign inDemoInstall

localforage-compatibility-1-4

Package Overview
Dependencies
3
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    localforage-compatibility-1-4

A plugin that handles Safari compatibility issues when upgrading from LocalForage v1.4 to v1.5.


Version published
Weekly downloads
3
decreased by-66.67%
Maintainers
1
Install size
531 kB
Created
Weekly downloads
 

Readme

Source

localForage-compatibility-1-4

npm

A plugin that handles Safari compatibility issues when upgrading from LocalForage v1.4 to v1.5.

You shouldn't need this plugin if your app never used LocalForage <= v1.4.x.

This plugin monkey patches the localforage.INDEXEDDB driver _support check, to the one used in LF v1.4.

Requirements

  • localForage v1.5.1+

Installation

npm i localforage-compatibility-1-4

API

Just chain a config() call before setting you preferred driver order or LF configuration to all localforage instances.

var driverPreferenceOrder = [
  localforage.INDEXEDDB,
  localforage.WEBSQL,
  localforage.LOCALSTORAGE
];

localforageCompatibility1_4.config().then(function() {
  localforage.config({
    driver: driverPreferenceOrder
  });
  // or
  // return localforage.setDriver(driverPreferenceOrder);
}).then(function() {
  // your LF code here
});

PS: take a look at the examples folder of this repo.

Creating instances

After the localforageCompatibility1_4.config() call resolves, all subsequent localforage.createInstance() calls will be using the LF v1.4 IndexedDB driver.

Keywords

FAQs

Last updated on 14 Oct 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc