https://github.com/rla/phantomjs-dirty
Dirty-compatible key-value database for PhantomJS
https://github.com/rla/phantomjs-dirty
database phantomjs
Last synced: 2 months ago
JSON representation
Dirty-compatible key-value database for PhantomJS
- Host: GitHub
- URL: https://github.com/rla/phantomjs-dirty
- Owner: rla
- License: mit
- Created: 2014-10-29T09:18:15.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-21T00:58:41.000Z (about 11 years ago)
- Last Synced: 2025-10-21T07:37:16.807Z (8 months ago)
- Topics: database, phantomjs
- Language: JavaScript
- Homepage:
- Size: 125 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Phantomjs-dirty
A [dirty](https://github.com/felixge/node-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.