Skip to content

Leveldown API implementation on top of IndexedDB

Notifications You must be signed in to change notification settings

kapetan/indexeddown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

indexeddown

Leveldown API implementation on top of IndexedDB. Underneath abstract-leveldown is used to ensure compatibility with leveldown.

npm install indexeddown

Only browsers with non-prefixed IndexedDB API are supported.

Usage

The regular leveldown API is exposed.

var indexeddown = require('indexeddown')

var db = indexeddown('test')

db.open(function (err) {
  db.put('key', 'value', function (err) {
    db.get('key', function (err, value) {
      console.log(value)
    })
  })
})

By default this implementation does not enable the snapshot feature available in leveldown, unless the snapshot option is passed to the constructor, but this might increase memory consumption.

var db = indexeddown('test', { snapshot: true })

About

Leveldown API implementation on top of IndexedDB

Resources

Stars

Watchers

Forks

Packages

No packages published