Skip to content

qs44/level.js

This branch is 241 commits behind Level/level-js:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

04489a4 · Feb 24, 2014

History

65 Commits
Apr 30, 2013
Jan 9, 2014
Feb 24, 2014
Feb 24, 2014
Jan 30, 2014
May 1, 2013
Feb 24, 2014
May 4, 2013
May 4, 2013
Feb 24, 2014
Feb 23, 2014

Repository files navigation

logo

level.js an implementation of the leveldown API on top of IndexedDB (which is in turn implemented on top of LevelDB, which brings this whole shebang full circle)

Most people use levelup on top of this library. See test-levelup.js for details

testling badge

NPM

level.js uses IDBWrapper by jensarps to ensure compatibility between IDB implementations.

Here are the goals of this level.js:

  • Store large amounts of ascii (strings, JSON) and binary (ArrayBuffers, Typed Arrays) data in modern browsers
  • Be as fast as possible
  • Use the leveldown test suite and sync with multilevel over either ascii or binary transports (websockets and xhr both have ascii/binary modes in browsers now)

Being leveldown compatible means you can use many of the level-* modules on top of this library.

install

npm install level-js

(Not to be confused with leveljs)

This library is best used with browserify

code examples

var leveljs = require('level-js')
var db = leveljs('bigdata')
db.open(function onOpen() { })

The test suite for this library is in the abstract-leveldown repo and is shared between various leveldown implementations across different environments and platforms.

For more code examples see the abstract-leveldown test suite

The only differences between this and leveldown is that you can store ArrayBuffers in this (whereas leveldown just uses node Buffer objects)

run the tests

git clone [email protected]:maxogden/level.js.git
cd level.js
npm install
npm test
open localhost:9966

Then look in your browser console

license

BSD

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%