Water seeks its own level; without not-water we cannot be wet.
Last updated 4 years ago by othiym23 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nothingness/level 
SYNC missed versions from official npm registry.


Minimal / simplistic / incomplete / bad adaptor to connect level to nothingness.


npm install --save nothingness @nothingness/level


var ThingerDAO = require('./thinger-dao.js');
var Adaptor = require('@nothingness/level');
var assert = require('assert');

var dao = new ThingerDAO(new Adaptor('./thinger-db'));
var thingy = { type: 'great band' };

// uses Bluebird's .nodeify(), so callback or promise chain are fine
dao.save(thingy, function (err) {
  if (err) throw err;

  dao.findAll(function (err, results) {
    if (err) throw err;

      [{ type: 'great band' }],
      'should only have one item, of type "great band"'

    console.log('round trip succeeded!');


new Adaptor(pathToLevelDB)

Connect the Adaptor to a LevelDB data directory; assumes that all values will be encoded as JSON.

save(key, value, cb)

Maps to the put function for levelup; assumes that key generation and object preparation is handled elsewhere.


Load all of the values in the collection. Override this unless you're only storing one type of value per LevelDB database.


Maps to the close function for levelup.


This is pre-1.0.0 software, and I'm going to keep iterating on this and nothingness until I have the basic CRUD logic and simple finders worked out for both sides in a way that doesn't make me want to barf. Getting this done in a way that keeps the coupling level right is tricky.

It may take a little while given my other commitments, so don't be surprised if this doesn't go anywhere interesting for a while.

Current Tags

  • 0.1.1                                ...           latest (4 years ago)

7 Versions

  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (7)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |