Dirty-compatible key-value database for PhantomJS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.gitignore
LICENSE
Makefile
README.md
index.js
package.json

README.md

Phantomjs-dirty

A dirty key-value database clone for PhantomJS and its synchronous CommonJS Filesystem/A IO. Database files are fully compatible between implementations.

Warning

Multi-process write usage of the same database file will corrupt it. There are is no file locking support in CommonJS Filesystem/A.

Installing

The package can be installed from NPM:

npm install phantomjs-dirty

Example

var dirty = require('./node_modules/phantomjs-dirty');

var db = dirty.open('test.dirty');

db.set('a-key', { a: 1 });

console.log(db.get('a-key'));

db.forEach(function(key, val) {

    console.log(key + ': ' + val);
});

Running tests

For running tests, development dependencies must be installed first.

npm install
make test

License

The MIT License.