Licence
MIT
Version
1.0.2
Deps
1
Vulns
0
Weekly
0
a-storage
a-storage is a simple JavaScript library for easily using WebStorage API.
Install width npm:
npm install --save a-storage
Configuration
Typical Usage:
import Storage, { DRIVERS } from 'a-storage';
const storage = Storage({
dirver: DRIVERS.SESSIONSTORAGE
});
driver
- Select the usage of particular driver.
- default:
LOCALSTORAGE - available drivers:
| driver | description |
|---|---|
MEMORY |
Use JavaScript Object |
LOCALSTORAGE |
Use native localStorage |
SESSIONSTORAGE |
Use native sessionStorage |
DOMAINSTORAGE |
domainStorage provide by dingtalk |
Promise
- Provide your own
Promiseimplemention - default: native
Promiseobject