A wrapper for abstract-leveldown compliant stores, for Node.js and browsers.

Overview

levelup

level badge npm Node version Test npm Coverage Status JavaScript Style Guide Backers on Open Collective Sponsors on Open Collective

Table of Contents

Click to expand

Introduction

Fast and simple storage. A Node.js wrapper for abstract-leveldown compliant stores, which follow the characteristics of LevelDB.

LevelDB is a simple key-value store built by Google. It's used in Google Chrome and many other products. LevelDB supports arbitrary byte arrays as both keys and values, singular get, put and delete operations, batched put and delete, bi-directional iterators and simple compression using the very fast Snappy algorithm.

LevelDB stores entries sorted lexicographically by keys. This makes the streaming interface of levelup - which exposes LevelDB iterators as Readable Streams - a very powerful query mechanism.

The most common store is leveldown which provides a pure C++ binding to LevelDB. Many alternative stores are available such as level.js in the browser or memdown for an in-memory store. They typically support strings and Buffers for both keys and values. For a richer set of data types you can wrap the store with encoding-down.

The level package is the recommended way to get started. It conveniently bundles levelup, leveldown and encoding-down. Its main export is levelup - i.e. you can do var db = require('level').

Supported Platforms

We aim to support Active LTS and Current Node.js releases as well as browsers. For support of the underlying store, please see the respective documentation.

Sauce Test Status

Usage

If you are upgrading: please see UPGRADING.md.

First you need to install levelup! No stores are included so you must also install leveldown (for example).

$ npm install levelup leveldown

All operations are asynchronous. If you do not provide a callback, a Promise is returned.

var levelup = require('levelup')
var leveldown = require('leveldown')

// 1) Create our store
var db = levelup(leveldown('./mydb'))

// 2) Put a key & value
db.put('name', 'levelup', function (err) {
  if (err) return console.log('Ooops!', err) // some kind of I/O error

  // 3) Fetch by key
  db.get('name', function (err, value) {
    if (err) return console.log('Ooops!', err) // likely the key was not found

    // Ta da!
    console.log('name=' + value)
  })
})

API

Special Notes

levelup(db[, options[, callback]])

The main entry point for creating a new levelup instance.

  • db must be an abstract-leveldown compliant store.
  • options is passed on to the underlying store when opened and is specific to the type of store being used

Calling levelup(db) will also open the underlying store. This is an asynchronous operation which will trigger your callback if you provide one. The callback should take the form function (err, db) {} where db is the levelup instance. If you don't provide a callback, any read & write operations are simply queued internally until the store is fully opened, unless it fails to open, in which case an error event will be emitted.

This leads to two alternative ways of managing a levelup instance:

levelup(leveldown(location), options, function (err, db) {
  if (err) throw err

  db.get('foo', function (err, value) {
    if (err) return console.log('foo does not exist')
    console.log('got foo =', value)
  })
})

Versus the equivalent:

// Will throw if an error occurs
var db = levelup(leveldown(location), options)

db.get('foo', function (err, value) {
  if (err) return console.log('foo does not exist')
  console.log('got foo =', value)
})

db.supports

A read-only manifest. Not widely supported yet. Might be used like so:

if (!db.supports.permanence) {
  throw new Error('Persistent storage is required')
}

if (db.supports.bufferKeys && db.supports.promises) {
  await db.put(Buffer.from('key'), 'value')
}

db.open([options][, callback])

Opens the underlying store. In general you should never need to call this method directly as it's automatically called by levelup().

However, it is possible to reopen the store after it has been closed with close(), although this is not generally advised.

If no callback is passed, a promise is returned.

db.close([callback])

close() closes the underlying store. The callback will receive any error encountered during closing as the first argument.

You should always clean up your levelup instance by calling close() when you no longer need it to free up resources. A store cannot be opened by multiple instances of levelup simultaneously.

If no callback is passed, a promise is returned.

db.put(key, value[, options][, callback])

put() is the primary method for inserting data into the store. Both key and value can be of any type as far as levelup is concerned.

options is passed on to the underlying store.

If no callback is passed, a promise is returned.

db.get(key[, options][, callback])

get() is the primary method for fetching data from the store. The key can be of any type. If it doesn't exist in the store then the callback or promise will receive an error. A not-found err object will be of type 'NotFoundError' so you can err.type == 'NotFoundError' or you can perform a truthy test on the property err.notFound.

db.get('foo', function (err, value) {
  if (err) {
    if (err.notFound) {
      // handle a 'NotFoundError' here
      return
    }
    // I/O or other error, pass it up the callback chain
    return callback(err)
  }

  // .. handle `value` here
})

options is passed on to the underlying store.

If no callback is passed, a promise is returned.

db.del(key[, options][, callback])

del() is the primary method for removing data from the store.

db.del('foo', function (err) {
  if (err)
    // handle I/O or other error
});

options is passed on to the underlying store.

If no callback is passed, a promise is returned.

db.batch(array[, options][, callback]) (array form)

batch() can be used for very fast bulk-write operations (both put and delete). The array argument should contain a list of operations to be executed sequentially, although as a whole they are performed as an atomic operation inside the underlying store.

Each operation is contained in an object having the following properties: type, key, value, where the type is either 'put' or 'del'. In the case of 'del' the value property is ignored. Any entries with a key of null or undefined will cause an error to be returned on the callback and any type: 'put' entry with a value of null or undefined will return an error.

var ops = [
  { type: 'del', key: 'father' },
  { type: 'put', key: 'name', value: 'Yuri Irsenovich Kim' },
  { type: 'put', key: 'dob', value: '16 February 1941' },
  { type: 'put', key: 'spouse', value: 'Kim Young-sook' },
  { type: 'put', key: 'occupation', value: 'Clown' }
]

db.batch(ops, function (err) {
  if (err) return console.log('Ooops!', err)
  console.log('Great success dear leader!')
})

options is passed on to the underlying store.

If no callback is passed, a promise is returned.

db.batch() (chained form)

batch(), when called with no arguments will return a Batch object which can be used to build, and eventually commit, an atomic batch operation. Depending on how it's used, it is possible to obtain greater performance when using the chained form of batch() over the array form.

db.batch()
  .del('father')
  .put('name', 'Yuri Irsenovich Kim')
  .put('dob', '16 February 1941')
  .put('spouse', 'Kim Young-sook')
  .put('occupation', 'Clown')
  .write(function () { console.log('Done!') })

batch.put(key, value[, options])

Queue a put operation on the current batch, not committed until a write() is called on the batch. The options argument, if provided, must be an object and is passed on to the underlying store.

This method may throw a WriteError if there is a problem with your put (such as the value being null or undefined).

batch.del(key[, options])

Queue a del operation on the current batch, not committed until a write() is called on the batch. The options argument, if provided, must be an object and is passed on to the underlying store.

This method may throw a WriteError if there is a problem with your delete.

batch.clear()

Clear all queued operations on the current batch, any previous operations will be discarded.

batch.length

The number of queued operations on the current batch.

batch.write([options][, callback])

Commit the queued operations for this batch. All operations not cleared will be written to the underlying store atomically, that is, they will either all succeed or fail with no partial commits.

The optional options object is passed to the .write() operation of the underlying batch object.

If no callback is passed, a promise is returned.

db.isOpen()

A levelup instance can be in one of the following states:

  • "new" - newly created, not opened or closed
  • "opening" - waiting for the underlying store to be opened
  • "open" - successfully opened the store, available for use
  • "closing" - waiting for the store to be closed
  • "closed" - store has been successfully closed, should not be used

isOpen() will return true only when the state is "open".

db.isClosed()

See isOpen()

isClosed() will return true only when the state is "closing" or "closed", it can be useful for determining if read and write operations are permissible.

db.createReadStream([options])

Returns a Readable Stream of key-value pairs. A pair is an object with key and value properties. By default it will stream all entries in the underlying store from start to end. Use the options described below to control the range, direction and results.

db.createReadStream()
  .on('data', function (data) {
    console.log(data.key, '=', data.value)
  })
  .on('error', function (err) {
    console.log('Oh my!', err)
  })
  .on('close', function () {
    console.log('Stream closed')
  })
  .on('end', function () {
    console.log('Stream ended')
  })

You can supply an options object as the first parameter to createReadStream() with the following properties:

  • gt (greater than), gte (greater than or equal) define the lower bound of the range to be streamed. Only entries where the key is greater than (or equal to) this option will be included in the range. When reverse=true the order will be reversed, but the entries streamed will be the same.

  • lt (less than), lte (less than or equal) define the higher bound of the range to be streamed. Only entries where the key is less than (or equal to) this option will be included in the range. When reverse=true the order will be reversed, but the entries streamed will be the same.

  • reverse (boolean, default: false): stream entries in reverse order. Beware that due to the way that stores like LevelDB work, a reverse seek can be slower than a forward seek.

  • limit (number, default: -1): limit the number of entries collected by this stream. This number represents a maximum number of entries and may not be reached if you get to the end of the range first. A value of -1 means there is no limit. When reverse=true the entries with the highest keys will be returned instead of the lowest keys.

  • keys (boolean, default: true): whether the results should contain keys. If set to true and values set to false then results will simply be keys, rather than objects with a key property. Used internally by the createKeyStream() method.

  • values (boolean, default: true): whether the results should contain values. If set to true and keys set to false then results will simply be values, rather than objects with a value property. Used internally by the createValueStream() method.

db.createKeyStream([options])

Returns a Readable Stream of keys rather than key-value pairs. Use the same options as described for createReadStream to control the range and direction.

You can also obtain this stream by passing an options object to createReadStream() with keys set to true and values set to false. The result is equivalent; both streams operate in object mode.

db.createKeyStream()
  .on('data', function (data) {
    console.log('key=', data)
  })

// same as:
db.createReadStream({ keys: true, values: false })
  .on('data', function (data) {
    console.log('key=', data)
  })

db.createValueStream([options])

Returns a Readable Stream of values rather than key-value pairs. Use the same options as described for createReadStream to control the range and direction.

You can also obtain this stream by passing an options object to createReadStream() with values set to true and keys set to false. The result is equivalent; both streams operate in object mode.

db.createValueStream()
  .on('data', function (data) {
    console.log('value=', data)
  })

// same as:
db.createReadStream({ keys: false, values: true })
  .on('data', function (data) {
    console.log('value=', data)
  })

db.iterator([options])

Returns an abstract-leveldown iterator, which is what powers the readable streams above. Options are the same as the range options of createReadStream and are passed to the underlying store.

db.clear([options][, callback])

This method is experimental. Not all underlying stores support it yet. Consult Level/community#79 to find out if your (combination of) dependencies support db.clear().

Delete all entries or a range. Not guaranteed to be atomic. Accepts the following range options (with the same rules as on iterators):

  • gt (greater than), gte (greater than or equal) define the lower bound of the range to be deleted. Only entries where the key is greater than (or equal to) this option will be included in the range. When reverse=true the order will be reversed, but the entries deleted will be the same.
  • lt (less than), lte (less than or equal) define the higher bound of the range to be deleted. Only entries where the key is less than (or equal to) this option will be included in the range. When reverse=true the order will be reversed, but the entries deleted will be the same.
  • reverse (boolean, default: false): delete entries in reverse order. Only effective in combination with limit, to remove the last N records.
  • limit (number, default: -1): limit the number of entries to be deleted. This number represents a maximum number of entries and may not be reached if you get to the end of the range first. A value of -1 means there is no limit. When reverse=true the entries with the highest keys will be deleted instead of the lowest keys.

If no options are provided, all entries will be deleted. The callback function will be called with no arguments if the operation was successful or with an WriteError if it failed for any reason.

If no callback is passed, a promise is returned.

What happened to db.createWriteStream?

db.createWriteStream() has been removed in order to provide a smaller and more maintainable core. It primarily existed to create symmetry with db.createReadStream() but through much discussion, removing it was the best course of action.

The main driver for this was performance. While db.createReadStream() performs well under most use cases, db.createWriteStream() was highly dependent on the application keys and values. Thus we can't provide a standard implementation and encourage more write-stream implementations to be created to solve the broad spectrum of use cases.

Check out the implementations that the community has produced here.

Promise Support

levelup ships with native Promise support out of the box.

Each function accepting a callback returns a promise if the callback is omitted. This applies for:

  • db.get(key[, options])
  • db.put(key, value[, options])
  • db.del(key[, options])
  • db.batch(ops[, options])
  • db.batch().write()

The only exception is the levelup constructor itself, which if no callback is passed will lazily open the underlying store in the background.

Example:

var db = levelup(leveldown('./my-db'))

db.put('foo', 'bar')
  .then(function () { return db.get('foo') })
  .then(function (value) { console.log(value) })
  .catch(function (err) { console.error(err) })

Or using async/await:

const main = async () => {
  const db = levelup(leveldown('./my-db'))

  await db.put('foo', 'bar')
  console.log(await db.get('foo'))
}

Events

levelup is an EventEmitter and emits the following events.

Event Description Arguments
put Key has been updated key, value (any)
del Key has been deleted key (any)
batch Batch has executed operations (array)
clear Entries were deleted options (object)
opening Underlying store is opening -
open Store has opened -
ready Alias of open -
closing Store is closing -
closed Store has closed. -
error An error occurred error (Error)

For example you can do:

db.on('put', function (key, value) {
  console.log('inserted', { key, value })
})

Multi-process Access

Stores like LevelDB are thread-safe but they are not suitable for accessing with multiple processes. You should only ever have a store open from a single Node.js process. Node.js clusters are made up of multiple processes so a levelup instance cannot be shared between them either.

See Level/awesome for modules like multileveldown that may help if you require a single store to be shared across processes.

Contributing

Level/levelup is an OPEN Open Source Project. This means that:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

See the Contribution Guide for more details.

Big Thanks

Cross-browser Testing Platform and Open Source Provided by Sauce Labs.

Sauce Labs logo

Donate

To sustain Level and its activities, become a backer or sponsor on Open Collective. Your logo or avatar will be displayed on our 28+ GitHub repositories and npm packages. 💖

Backers

Open Collective backers

Sponsors

Open Collective sponsors

License

MIT © 2012-present Contributors.

Comments
  • Memory leak in db.batch

    Memory leak in db.batch

    Hei

    Maintainer of search-index and Norch here :)

    There seems to be a memory leak in db.batch. When inserting thousands of batch files with db.batch the memory allocation of the parent app shoots up rather alarmingly, and does not come down again.

    This issue has appeared in the last few weeks

    Any ways to manually free up memory or otherwise force garbage collection?

    F

    opened by fergiemcdowall 99
  • allow extra values in get/put callbacks

    allow extra values in get/put callbacks

    This is mostly to facilitate RiakDOWN, since tracking vclocks manually is sometimes desirable.

    This will allow the _put method in abstract-leveldown backends to pass a value out to the client, and the _get method to pass extra metadata as well.

    opened by nlf 82
  • Node Databases Conference

    Node Databases Conference

    Let's do this. There's a ton of stuff happening around and beyond the level* world and it'd be great to pull it all together for an event so people can showcase what they're doing and discuss the potential going forward.

    Makes sense to do this in SF and I'm hoping that @mikeal is still interested enough to be able to offer at least some high-level input in to how to pull something like this off.

    I'm thinking of a 1-day of formal talks covering the whole stack, from storage to important mid-level abstractions (in the sublevel, multilevel area) all the way up to interesting production use-cases and mad science experiments that point the way forward. Then an informal & optional second day unconference or just hang-out that's discussion focused, perhaps even facilitate a break-up into working groups.

    Not sure about timing because I'm not sure how hard it would be to organise and pull everything together. Somewhere between November and February would be neat.

    Sponsorship might be tricky so we'll have to keep things fairly light.

    opened by rvagg 74
  • public levelup rc testing

    public levelup rc testing

    We should get as many people as possible to test [email protected].

    I'm thinking the following:

    • [x] tweet about it: https://twitter.com/juliangruber/status/907246400194441217
    • [ ] test libs
      • [x] ~~level-sublevel~~ subleveldown
      • [x] pouchdb
      • [ ] browserify-fs
      • [ ] merkle-patricia-tree
      • [ ] dynalite
      • [ ] mosca
      • [ ] hard-source-webpack-plugin
      • [ ] gittoken-api-middleware
      • [x] secure-scuttlebutt
    • [x] test apps
      • [x] Voltra
    discussion 
    opened by juliangruber 64
  • Windows support

    Windows support

    (Was "Windows build fails", ed:RV)

    Actual NPM error log: https://gist.github.com/3730932

    I just found something about compiling leveldb in Windows: https://groups.google.com/d/msg/leveldb/VuECZMnsob4/tROLqJq_JcEJ

    And here are the aditional packages that are needed: http://www.boost.org/users/download

    And some more information from official source: http://code.google.com/p/leveldb/source/browse/WINDOWS?name=windows

    bug 
    opened by cranic 47
  • writeStream.write callback

    writeStream.write callback

    When using a write stream, the Node spec says that you can pass in a callback as last argument like this:

    var ws = db.createWriteStream();
    var o = {key:'k1', value: 'v1'};
    ws.write(o, function() {
      console.log('wrote', o);
    });
    

    I don't need the the write stream interface to be 100% compliant, but I do need to get write acknowledges, which the current implementation does not provide.

    I looked at the source code and I couldn't find an obvious way around this (except for reimplementing the write stream on top of db.put and db.del, but I didn't want to go that way).

    For instance, is there any event that is emitted after a flush? I was looking at the drain event emitted here, but I think that _writeBlock is not always true, so I can't trust that, can I?

    opened by pgte 44
  • Bite the bullet and remove WriteStream completely?

    Bite the bullet and remove WriteStream completely?

    WriteStream is only there for the sake of symmetry but that's not a great reason in itself if there are better reasons for it not to be there. I think we're starting to realise that there are different use-cases that require different implementations and we're already seeing some alternative implementations so why not set them free to coexist and compete in user-land?

    Discuss

    If we conclude that it should be removed then we can add documentation to the ReadStream section saying that if you want a WriteStream then go to a particular place on the wiki to see a list of implementations and what they are good for. We could even dedicate a whole wiki page to this if need be.

    if we concluded that it should stay, then I'll try and get these competing pull requests for new WriteStreams reconciled and sort something out because having a streams2 ReadStream and a streams1 WriteStream is a mess and this needs to be resolved.

    opened by rvagg 42
  • 1.0.0-wip

    1.0.0-wip

    Let's get a 1.0.0 done to compliment [email protected]

    • [x] Update leveldown to 1.0.0
    • [x] Allow saving of empty values
    • [x] Remove write-stream (#207)

    Have I missed something else we should try and get into this release?

    opened by kesla 40
  • feat: restore typings + testing

    feat: restore typings + testing

    • to start discussion and review of adding typings back into master
    • keen eye will notice imports for tests are using .default for some level stuff. This is because the typescript compiler will complain because those repositories now have es2015 default exports.
    help wanted 
    opened by MeirionHughes 39
  • website

    website

    As in #122.

    It would be cool to have a website. Ones that I really like for open source projects are:

    • http://voxeljs.com/
    • http://www.tus.io/

    What they have is:

    • an introduction
    • runnable examples
    • tutorials to get started

    we could use a indexdb wrapper thing to do this

    • an architectural overview
    • featured modules & tools

    We have awesome modules and tools already

    • a live stream of community activity

    Kinda nice.

    • a newsletter

    Kinda nice.

    • pictures of everyone involved

    Super nice.

    • a blog

    Maybe?

    What do you guys think?

    opened by juliangruber 39
  • isEmbedded() expose what sort of contract the leveldown can provide.

    isEmbedded() expose what sort of contract the leveldown can provide.

    After seeing a talk at nodeconf eu that used sqldown I realized it would be impossible to stop people using levelup with non-embedded back ends, and having a discussion of this https://github.com/rvagg/node-levelup/pull/255 scale every time would only turn me into a grumpy old bastard...

    Then I realized there was a simpler possibility, we add an db.isEmbedded() method this would be exposed on the levelup and leveldown instances, and modules that do not support non-embedded databases can throw with a helpful error message (that links to documentation on the distinction between embedded and service databases)

    Also, there would be documentation on isEmbedded() and it would be easy to do a few pull requests to add isEmbedded to the various leveldowns. So it would be simpler than reimplementing all of level https://github.com/rvagg/node-levelup/issues/270 (this will take a long time, anyway) but still allow people using level in other ways, such as @nlf @adambrault @fritzy are doing.

    enhancement discussion 
    opened by dominictarr 33
Releases(v5.1.1)
  • v5.1.1(Oct 2, 2021)

  • v5.1.0(Oct 1, 2021)

  • v5.0.1(Jun 7, 2021)

  • v5.0.0(Apr 17, 2021)

    If you are upgrading: please see UPGRADING.md.

    Changed

    • Breaking: modernize syntax and bump standard (Level/community#98) (e19cd54, 762d989) (Vincent Weevers)
    • Breaking: remove Batch._levelup property (cfce6bb) (Vincent Weevers).
    • Align nextTick behavior with abstract-leveldown (4b35716) (Vincent Weevers).
    • Add files to package.json and remove .npmignore (29d8b5d) (Vincent Weevers)
    • Replace xtend with Object.assign() (7bfc0d4) (Vincent Weevers)
    • Bump deferred-leveldown, level-errors, -iterator-stream and -supports (8b518b1, 1b0cfb8) (Vincent Weevers)
    • Refactor promisify() code by using catering module (#700) (Lars-Magnus Skog)

    Added

    • Support encoding options on chained batch put() and del() (#717, #633) (0765808) (Vincent Weevers)

    Removed

    Source code(tar.gz)
    Source code(zip)
  • v4.4.0(Apr 11, 2020)

  • v4.3.2(Oct 4, 2019)

  • v4.3.1(Oct 3, 2019)

  • v4.3.0(Sep 30, 2019)

  • v4.2.0(Sep 8, 2019)

  • v4.1.0(Jun 28, 2019)

    Changed

    • Upgrade deferred-leveldown from ~5.0.0 to ~5.1.0 (#657) (@vweevers)
    • Upgrade delayed devDependency from ^1.0.1 to ^2.0.0 (#659) (@vweevers)

    Added

    * Historical Note Many thanks to @MeirionHughes for adding seek() support to memdown, encoding-down, deferred-leveldown and subleveldown. At the time of writing, all but subleveldown have been released. Go forth and seek!

    Source code(tar.gz)
    Source code(zip)
  • v4.0.2(Jun 8, 2019)

    Changed

    Added

    Removed

    Fixed

    Source code(tar.gz)
    Source code(zip)
  • v4.0.1(Mar 30, 2019)

  • v4.0.0(Mar 30, 2019)

    If you are upgrading: please see UPGRADING.md.

    Changed

    • Upgrade nyc devDependency from ~12.0.2 to ~13.1.0 (@ralphtheninja)
    • Upgrade deferred-leveldown dependency from ~4.0.0 to ~5.0.0 (@vweevers)
    • Upgrade concat-stream devDependency from ~1.6.0 to ~2.0.0 (@ralphtheninja)
    • Upgrade level-iterator-stream dependency from ~3.0.0 to ~4.0.0 (@ralphtheninja)
    • Replace remark-cli with hallmark (#621) (@vweevers)
    • Upgrade standard devDependency from ^11.0.0 to ^12.0.0 (@ralphtheninja)
    • Add .nyc_output/ to .npmignore (@ralphtheninja)

    Removed

    Source code(tar.gz)
    Source code(zip)
  • v3.1.1(Jul 14, 2018)

  • v3.1.0(Jun 22, 2018)

  • v3.0.1(May 24, 2018)

    Changed

    • Update airtap to 0.0.6 (@ralphtheninja)

    Removed

    • Remove .jshintrc (@ralphtheninja)
    • Remove brfs and use Buffer.from() in favor of fs.readFileSync() (@ralphtheninja)
    Source code(tar.gz)
    Source code(zip)
  • v3.0.0(May 23, 2018)

    Added

    • Add node 10 to Travis (@ralphtheninja)
    • Add browser support to test suite (@vweevers)
    • Add airtap for browser tests in Sauce Labs (@vweevers)

    Changed

    • Update memdown to ^3.0.0 (@vweevers)
    • Update encoding-down to ^5.0.0 (@ralphtheninja)
    • Update deferred-leveldown to ~4.0.0 (@ralphtheninja)
    • Update standard to ^11.0.0 (@ralphtheninja)
    • Update level-errors to ~2.0.0 (@ralphtheninja)
    • Update bl to ^2.0.0 (@ralphtheninja)
    • README: tweak api sub sections (@ralphtheninja)

    Fixed

    • Fix defunct keyEncoding in inject-encoding-test.js (@vweevers)

    Removed

    • Remove irrelevant leveldown-substitution-test.js (@ralphtheninja)
    • Remove node 4 from Travis (@ralphtheninja)
    • Remove batch operations defaulting to put (@vweevers)
    • Remove compiler toolchain from Travis (@vweevers)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.2(Feb 12, 2018)

    Added

    • Add 9 to Travis (@ralphtheninja)

    Changed

    • Update browserify to 16.0.0 (@ralphtheninja)
    • Update leveldown to 3.0.0 (@ralphtheninja)
    • Update deferred-leveldown to 3.0.0 (@ralphtheninja)
    • README: normalize readme style (@ralphtheninja)
    • README: use markdown links instead of <a href></a> (@ralphtheninja)
    • Clarify 'must provide db' error message (@adityapurwa)
    • Update copyright year to 2018 (@adityapurwa)

    Removed

    • Remove abstract-leveldown devDependency (@ralphtheninja)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Feb 12, 2018)

    Changed

    • README: clarify that options are specific to the underlying store (@ralphtheninja)
    • Update abstract-leveldown to 3.0.0 (@ralphtheninja)
    • Update encoding-down to 3.0.0 (@ralphtheninja)

    Fixed

    • Restore support for node 4 (@farskipper)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Oct 10, 2017)

    Added

    • Add default export (@zixia)
    • Test that key and value of queued operation is not serialized (@vweevers)
    • Test JSON encoding with stream (@vweevers)
    • Add smoke test for levelup and leveldown without encoding-down (@vweevers)

    Changed

    • Update leveldown (@ralphtheninja)
    • README: prefer 'underlying store' over database, backend etc (@vweevers)
    • README: update badges (@ralphtheninja)
    • README: unquote properties (@vweevers)
    • README: clarify what excluding callback means (@vweevers)
    • README: 'arbitrary data object' => 'of any type' (@vweevers)
    • README: reduce 'supported platforms' section (@vweevers)
    • README: rewrite intro and relationship with leveldown (@vweevers)
    • README: cleanup (@vweevers)
    • README: fix bad async code example (@ralphtheninja)
    • Update deferred-leveldown (@ralphtheninja)

    Removed

    • Remove unstable typings and Typescript tests (@MeirionHughes)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc3(Feb 12, 2018)

    Changed

    • Refactor typings, use abstract-leveldown types (@MeirionHughes)
    • Update leveldown (@MeirionHughes)

    Fixed

    • Correct bad encoding options in tests (@MeirionHughes)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc2(Feb 12, 2018)

    Added

    • README: add node version badge (@ralphtheninja)
    • Add Typescript definitions and testing (@MeirionHughes)

    Changed

    • README: homogenize readme style (@vweevers)
    • Update level-errors (@ralphtheninja)
    • Optimize Typescript tests (@vweevers)

    Removed

    • Remove 7 from Travis (@ralphtheninja)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc1(Feb 12, 2018)

    Added

    • Add Promise to the API if callbacks are omitted (@juliangruber)
    • Add Greenkeeper badge (@ralphtheninja)
    • Add tests for maybeError() calling back synchronously if db is closed (@ralphtheninja)

    Changed

    • Update deferred-leveldown to 2.0.0 (@ralphtheninja)
    • Change levelup constructor to take store as first parameter (@ralphtheninja)
    • Switch to use AbstractLevelDOWN#status (@ralphtheninja)
    • Update copyright year to 2017 (@ralphtheninja)
    • Rename lib/util.js to lib/promisify.js (@ralphtheninja)

    Removed

    • Remove approximateSize() (@ralphtheninja)
    • Remove destroy() (@ralphtheninja)
    • Remove repair() (@ralphtheninja)
    • Remove getProperty() (@ralphtheninja)
    • Remove .errorIfExists (@ralphtheninja)
    • Remove .createIfMissing (@ralphtheninja)
    • Remove .compression (@ralphtheninja)
    • Remove .cacheSize (@ralphtheninja)
    • Remove .sync (@ralphtheninja)
    • Remove .fillCache (@ralphtheninja)
    • Remove optional leveldown (@ralphtheninja)
    • Remove unused options parameter from maybeError (@ralphtheninja)
    • Remove browser field from package.json (@ralphtheninja)
    • Remove 0.12 and 4 from Travis (@juliangruber)
    • Remove unused isDefined from lib/util.js (@ralphtheninja)
    • Remove encodings (@ralphtheninja)
    • Remove dispatchError(), callback is always a function (@ralphtheninja)

    Fixed

    • Fix problems with zalgo in maybeError() (@ralphtheninja)
    Source code(tar.gz)
    Source code(zip)
Owner
Level
Create transparent databases.
Level
A database library stores JSON file for Node.js.

concisedb English | 简体中文 A database library stores JSON file for Node.js. Here is what updated every version if you want to know. API Document Usage B

LKZ烂裤子 3 Sep 4, 2022
Uniswapv2-pool-funding - A "Nugget Standard for Funding" compliant smart contract to provide liquidity to UniswapV2 (clone) pools. (Quickswap in this case)

uniswap(clone)-v2-pool-funding A smart contract that makes it easy to: supply liquidity to a uniswap(clone)-v2 pool using ERC20 or the network native

null 2 May 14, 2022
Realm is a mobile database: an alternative to SQLite & key-value stores

Realm is a mobile database that runs directly inside phones, tablets or wearables. This project hosts the JavaScript versions of Realm. Currently we s

Realm 5.1k Jan 3, 2023
Persisted global stores for Alpine 3.x.

✨ Help support the maintenance of this package by sponsoring me. Fern Persisted global stores for Alpine 3.x. Installation Since Fern directly extends

Ryan Chandler 25 Dec 15, 2022
mini-stores - 小程序多状态管理库,支持微信/支付宝/钉钉/百度/字节/QQ/京东等小程序,小巧高性能,新老项目都可使用。

mini-stores - 小程序多状态管理 前言 安装 API 使用 创建store 创建页面 创建组件 视图上使用 更新状态 使用建议 快捷链接 前言 公司好几款产品使用钉钉小程序开发,和其他平台小程序一样,都没有官方实现的状态管理库,用过redux、vuex、mobx等状态管理库的前端小伙伴都

linjc 104 Dec 27, 2022
Anonymify - Outils TypeScript pour l'anonymisation des données en langue Française, compatible Node.js et dans les browsers.

@socialgouv/anonymify Outils TypeScript pour l'anonymisation des données en langue Française. Compatible Node.js et dans les navigateurs Démo : https:

Fabrique numérique des Ministères Sociaux 4 Nov 16, 2022
Run official FLAC tools `flac` and `metaflac` as WebAssembly, on browsers or Deno.

flac.wasm Run official FLAC tools flac and metaflac as WebAssembly, on browsers or Deno. Currently we have no plans on supporting Node.js. Try it onli

Pig Fang 15 Aug 21, 2022
Securely collect browsing history over browsers.

Visited-CLI Securely collect browsing history over browsers. Getting started Here is the getting started guide. Firstly, clone the git, and change to

Fumiya A 62 Dec 30, 2022
WASM-based implementation of Cloudflare's HTML Rewriter for use in Deno, browsers, etc.

HTML Rewriter WASM-based implementation of Cloudflare's HTML Rewriter for use in Deno, browsers, etc. It uses lol-html under the hood, the same implem

Worker Tools 36 Dec 6, 2022
A GraphQL wrapper of the DeSo API.

DeSo GraphQL A DeSo GraphQL wrapper sitting on top of the DeSo HTTP API. What is DeSo (Decentralized Social) DeSo is a new type of blockchain designed

WAGMI Labs 11 Nov 20, 2022
A tiny wrapper around pg that makes PostgreSQL a lot of fun to use. Written in TypeScript.

A tiny wrapper around pg that makes PostgreSQL a lot of fun to use. Written in TypeScript.

Mojolicious 8 Nov 29, 2022
AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.

Please use version 1.x as prior versions has a security flaw if you use user generated data to concat your SQL strings instead of providing them as a

Andrey Gershun 6.1k Jan 9, 2023
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases.

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite datab

MikroORM 5.4k Dec 31, 2022
⚡️ lowdb is a small local JSON database powered by Lodash (supports Node, Electron and the browser)

Lowdb Small JSON database for Node, Electron and the browser. Powered by Lodash. ⚡ db.get('posts') .push({ id: 1, title: 'lowdb is awesome'}) .wri

null 18.9k Dec 30, 2022
Execute one command (or mount one Node.js middleware) and get an instant high-performance GraphQL API for your PostgreSQL database!

PostGraphile Instant lightning-fast GraphQL API backed primarily by your PostgreSQL database. Highly customisable and extensible thanks to incredibly

Graphile 11.7k Jan 4, 2023
A simple Node.js ORM for PostgreSQL, MySQL and SQLite3 built on top of Knex.js

bookshelf.js Bookshelf is a JavaScript ORM for Node.js, built on the Knex SQL query builder. It features both Promise-based and traditional callback i

Bookshelf.js 6.3k Jan 2, 2023
The JavaScript Database, for Node.js, nw.js, electron and the browser

The JavaScript Database Embedded persistent or in memory database for Node.js, nw.js, Electron and browsers, 100% JavaScript, no binary dependency. AP

Louis Chatriot 13.2k Jan 2, 2023
🚀 A robust, performance-focused and full-featured Redis client for Node.js.

A robust, performance-focused and full-featured Redis client for Node.js. Supports Redis >= 2.6.12 and (Node.js >= 6). Completely compatible with Redi

Zihua Li 11.6k Jan 8, 2023
An adapter-based ORM for Node.js with support for mysql, mongo, postgres, mssql (SQL Server), and more

Waterline is a next-generation storage and retrieval engine, and the default ORM used in the Sails framework. It provides a uniform API for accessing

Balderdash 5.4k Jan 4, 2023