5.1.7 • Published 4 years ago

air5-browser v5.1.7

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

air5-browser

Logo

Air5 Is An Asynchronous And Flexible Database Manager That Supports Many Providers.

Providers

  • PouchDB
  • MemoryDB
  • WebSQL
  • AirDB
  • ArrayDB
  • IndexedDB
  • LocalStorage

Installation

$ npm i air5-browser --save

Usage

const Air5 = require('air5-browser')

// Use One Of The Following

const database = new Air5('example-name', {
    provider: 'pouchDB | memoryDB | airDB | arrayDB | webSQL | indexedDB | localStorage',
    path: './.air5/'
})

await database.set(key, value)
// Insert Key And Value Into The Database

await database.get(key, value)
// Fetch Key Or Value From The Database

await database.has(key, value)
// Check If Key Or Value Exists In The Database

await database.delete(key)
// Delete Key From The Database

await database.clear()
// Clear The Whole Database

await database.data()
// Convert And Return The Database As JSON

await database.toJSON()
// Convert And Return The Database As JSON

await database.toArray()
// Convert And Return The Database As An Array