
Product
A New Overview in our Dashboard
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
@aveq-research/localforage-asyncstorage-driver
Advanced tools
[](https://badge.fury.io/js/%40aveq-research%2Flocalforage-asyncstorage-driver)
This Library contains a driver which enables to use localforage for React-Native's AsyncStorage.
Please note! With the switch to v3.0.0 @react-native-async-storage/async-storage
became a peer dependency!!
Simply install the driver via NPM:
npm i --save @aveq-research/localforage-asyncstorage-driver
If not done yet, make sure to have the appropriate peer dependencies (react
resp. react-native
) to be installed.
It delivers three different methods to create an appropriate driver:
driverWithoutSerialization()
: Create a common AsyncStorage driver which does not serialize any data automatically; you need to integrate your own serialization!driverWithSerialization(serializer)
: Creates an AsyncStorage driver with the given serializer; A valid serializer needs to contain a serialize
and deserialize
methoddriverWithDefaultSerialization()
: Will use the default serialization from localforageWorking Code Example:
import { driverWithoutSerialization } from '@aveq-research/localforage-asyncstorage-driver';
const driver = driverWithoutSerialization();
await localforage.defineDriver(driver);
await localforage.setDriver(driver._driver); // i.e. "rnAsyncStorageWrapper"
Alternatively with instance usage:
import { driverWithoutSerialization } from '@aveq-research/localforage-asyncstorage-driver';
const driver = driverWithoutSerialization();
const instance = localforage.createInstance({ driver });
After that you may use localforage as you know it already. For further questions concerning the localforage API, lookup https://github.com/localForage/localForage
This driver is distributed under MIT License (see LICENSE) and maintained by the wonderful AVEQ team.
FAQs
[](https://badge.fury.io/js/%40aveq-research%2Flocalforage-asyncstorage-driver)
The npm package @aveq-research/localforage-asyncstorage-driver receives a total of 525 weekly downloads. As such, @aveq-research/localforage-asyncstorage-driver popularity was classified as not popular.
We found that @aveq-research/localforage-asyncstorage-driver demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.