1.0.0 • Published 7 years ago
zapier-async-storage v1.0.0
zapier-async-storage
Minimalist wrapper for IndexedDB
Usage
npm install zapier-async-storageimport { createInstance } from 'zapier-async-storage';
const db = createInstance({
  storeName: 'my-store',
  dbName: 'AsyncStorage',
  version: 1,
});
db.setItem('hello', 'world')
  .then(db.getItem('hello'))
  .then((result) => {
    console.log(result); // 'world'
  });Configuration
WIP.
Development
npm run start
open http://localhost:8001/__tests__/Navigate to http://localhost:8001/__tests__ to view the Mocha test suite.
Browser Compatibilty
This library uses modern JS features like Object.assign and Promise, so for compatibilty with older browsers (i.e., IE), you'll need an appropriate polyfill.