1.0.2 • Published 7 years ago

a-storage v1.0.2

Weekly downloads
9
License
MIT
Repository
github
Last release
7 years ago

a-storage

npm npm

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:
driverdescription
MEMORYUse JavaScript Object
LOCALSTORAGEUse native localStorage
SESSIONSTORAGEUse native sessionStorage
DOMAINSTORAGEdomainStorage provide by dingtalk

Promise

  • Provide your own Promise implemention
  • default: native Promise object