Skip to content

A localStorage implementation of the LevelDOWN API

License

Notifications You must be signed in to change notification settings

suziwen/localdown

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

localdown

A localStorage implementation of the LevelDOWN API

About

LocalDOWN is a drop-in replacement for LevelDOWN that uses node-localstorage to persist changes.

Example (ES6)

import localdown from 'localdown'

let db = localdown('/path/to/store/file')

db.open((error) => {
  db.put('1', 'one', (error) => {
    db.get('one', { asBuffer: false }, (error, value) => {
      console.log(value)
      // > one
      db.close((error) => {
        // ...
      })
    })
  })
})

Constructor

localdown(location[,quota])

  • location - file path
  • quota - storage quota, optional

About

A localStorage implementation of the LevelDOWN API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%