{"_id":"dirty","_rev":"678290","name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","dist-tags":{"latest":"1.1.3"},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"time":{"modified":"2021-08-29T05:40:48.000Z","created":"2011-01-13T12:21:39.554Z","1.1.3":"2021-08-29T05:38:55.443Z","1.1.2":"2021-06-17T22:12:07.592Z","1.1.1":"2021-02-28T06:12:36.990Z","1.1.0":"2016-07-29T13:23:50.600Z","1.0.0":"2016-01-26T16:50:09.079Z","0.9.9":"2014-01-29T14:32:16.878Z","0.9.8":"2014-01-28T14:15:22.215Z","0.9.7":"2013-03-27T21:44:01.405Z","0.9.6":"2012-02-05T22:32:24.999Z","0.9.5":"2011-11-28T12:47:27.826Z","0.9.4":"2011-09-16T20:12:01.939Z","0.9.2":"2011-05-24T13:43:35.345Z","0.9.1":"2011-01-13T12:21:39.554Z","0.9.0":"2011-01-13T12:21:39.554Z"},"users":{"dbrockman":true,"anaphase":true,"hagb4rd":true,"detj":true,"marado":true},"repository":{"type":"git","url":"git+https://github.com/felixge/node-dirty.git"},"versions":{"1.1.3":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"1.1.3","repository":{"type":"git","url":"git+https://github.com/felixge/node-dirty.git"},"license":"MIT","dependencies":{},"main":"./lib/dirty","devDependencies":{"eslint":"^7.32.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-mocha":"^9.0.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prefer-arrow":"^1.2.3","eslint-plugin-promise":"^5.1.0","eslint-plugin-you-dont-need-lodash-underscore":"^6.12.0","mocha":"^9.1.1","rimraf":"^3.0.2"},"engines":{"node":">=12.13.0"},"scripts":{"lint":"eslint .","lint:fix":"eslint --fix .","test":"mocha test/test-*.js -R list"},"gitHead":"d7fb4d4ecf0cce144efa21b674965631a7955e61","bugs":{"url":"https://github.com/felixge/node-dirty/issues"},"homepage":"https://github.com/felixge/node-dirty#readme","_id":"dirty@1.1.3","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"shasum":"69a59dca061b261d19f65c2dc955c205c8931940","size":11295,"noattachment":false,"key":"/dirty/-/dirty-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-1.1.3.tgz"},"_npmUser":{"name":"rhansen0","email":"rhansen@rhansen.org"},"directories":{},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dirty_1.1.3_1630215535310_0.6123846521643823"},"_hasShrinkwrap":false,"publish_time":1630215535443,"_cnpm_publish_time":1630215535443},"1.1.2":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"1.1.2","repository":{"type":"git","url":"git+https://github.com/felixge/node-dirty.git"},"license":"MIT","dependencies":{},"main":"./lib/dirty","devDependencies":{"mocha":"^9.0.0","rimraf":"^3.0.2"},"scripts":{"test":"mocha test/test-*.js -R list"},"gitHead":"cea69c96d97d6cce8887d10ae6ab9c5e17b8e182","bugs":{"url":"https://github.com/felixge/node-dirty/issues"},"homepage":"https://github.com/felixge/node-dirty#readme","_id":"dirty@1.1.2","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"shasum":"4fc52d455faa955a8ccedcc875d7b4a5cd768240","size":8322,"noattachment":false,"key":"/dirty/-/dirty-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-1.1.2.tgz"},"_npmUser":{"name":"rhansen0","email":"rhansen@rhansen.org"},"directories":{},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dirty_1.1.2_1623967927420_0.4365840241338341"},"_hasShrinkwrap":false,"publish_time":1623967927592,"_cnpm_publish_time":1623967927592},"1.1.1":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"1.1.1","repository":{"type":"git","url":"git+https://github.com/felixge/node-dirty.git"},"license":"MIT","dependencies":{},"main":"./lib/dirty","devDependencies":{"mocha":"^8.3.0","rimraf":"^3.0.2"},"scripts":{"test":"mocha test/test-*.js -R list"},"gitHead":"9679a059363e6b07c1a04bdb71387c21967fe78c","bugs":{"url":"https://github.com/felixge/node-dirty/issues"},"homepage":"https://github.com/felixge/node-dirty#readme","_id":"dirty@1.1.1","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"shasum":"d1223e250ee8d76e9868923136b378b46383254b","size":8321,"noattachment":false,"key":"/dirty/-/dirty-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-1.1.1.tgz"},"_npmUser":{"name":"rhansen0","email":"rhansen@rhansen.org"},"directories":{},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dirty_1.1.1_1614492756601_0.6331378349285124"},"_hasShrinkwrap":false,"publish_time":1614492756990,"_cnpm_publish_time":1614492756990},"1.1.0":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"1.1.0","repository":{"type":"git","url":"git+https://github.com/felixge/node-dirty.git"},"dependencies":{},"main":"./lib/dirty","devDependencies":{"mocha":"~1.8.2","rimraf":"~2.1.4"},"scripts":{"test":"mocha test/test-*.js -R list"},"gitHead":"6285fce15d3bc76bc288259ed2a095cd2936e218","bugs":{"url":"https://github.com/felixge/node-dirty/issues"},"homepage":"https://github.com/felixge/node-dirty#readme","_id":"dirty@1.1.0","_shasum":"70edd2b999541dc9974fd3a8cbd0c670fe236078","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"havvy","email":"ryan.havvy@gmail.com"},"dist":{"shasum":"70edd2b999541dc9974fd3a8cbd0c670fe236078","size":8397,"noattachment":false,"key":"/dirty/-/dirty-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-1.1.0.tgz"},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/dirty-1.1.0.tgz_1469798625688_0.636430076090619"},"directories":{},"publish_time":1469798630600,"_cnpm_publish_time":1469798630600,"_hasShrinkwrap":false},"1.0.0":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"1.0.0","dependencies":{},"main":"./lib/dirty","devDependencies":{"mocha":"~1.8.2","rimraf":"~2.1.4"},"scripts":{"test":"./node_modules/mocha/bin/mocha test/test-*.js -R list"},"engines":{"node":"*"},"gitHead":"141f4ab665e1f7b89688b97480c07ab79483e4c1","_id":"dirty@1.0.0","_shasum":"ff4f23ed433d77edacecd7bc36bd05f8fe77a7cd","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"felixge","email":"felix@debuggable.com"},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"dist":{"shasum":"ff4f23ed433d77edacecd7bc36bd05f8fe77a7cd","size":8086,"noattachment":false,"key":"/dirty/-/dirty-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-1.0.0.tgz"},"directories":{},"publish_time":1453827009079,"_cnpm_publish_time":1453827009079,"_hasShrinkwrap":false},"0.9.9":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"0.9.9","dependencies":{},"main":"./lib/dirty","devDependencies":{"mocha":"~1.8.2","rimraf":"~2.1.4"},"scripts":{"test":"./node_modules/mocha/bin/mocha test/test-*.js -R list"},"engines":{"node":"*"},"_id":"dirty@0.9.9","dist":{"shasum":"f785804c4cf7907220cb10fa576b22329feda545","size":8063,"noattachment":false,"key":"/dirty/-/dirty-0.9.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-0.9.9.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"younggi","email":"roadlamp@gmail.com"},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"directories":{},"publish_time":1391005936878,"_cnpm_publish_time":1391005936878,"_hasShrinkwrap":false},"0.9.8":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"0.9.8","dependencies":{},"main":"./lib/dirty","devDependencies":{"mocha":"~1.8.2","rimraf":"~2.1.4"},"scripts":{"test":"./node_modules/mocha/bin/mocha test/test-*.js -R list"},"engines":{"node":"*"},"_id":"dirty@0.9.8","dist":{"shasum":"935c118f424ce29b36b8033553fe6433dfbab767","size":7849,"noattachment":false,"key":"/dirty/-/dirty-0.9.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-0.9.8.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"younggi","email":"roadlamp@gmail.com"},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"directories":{},"publish_time":1390918522215,"_cnpm_publish_time":1390918522215,"_hasShrinkwrap":false},"0.9.7":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"0.9.7","dependencies":{},"main":"./lib/dirty","devDependencies":{"mocha":"~1.8.2","rimraf":"~2.1.4"},"scripts":{"test":"./node_modules/mocha/bin/mocha test/test-*.js -R list"},"engines":{"node":"*"},"readmeFilename":"README.md","_id":"dirty@0.9.7","dist":{"shasum":"20549eb3a82d880b52584247911b73ec262b121f","size":7641,"noattachment":false,"key":"/dirty/-/dirty-0.9.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-0.9.7.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"bentaber","email":"ben.taber@gmail.com"},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"directories":{},"publish_time":1364420641405,"_cnpm_publish_time":1364420641405,"_hasShrinkwrap":false},"0.9.6":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"0.9.6","dependencies":{},"main":"./lib/dirty","devDependencies":{"gently":">=0.8.0"},"engines":{"node":"*"},"_npmUser":{"name":"bentaber","email":"ben.taber@gmail.com"},"_id":"dirty@0.9.6","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.9","_defaultsLoaded":true,"dist":{"shasum":"dc78209c0f918a66d6ed28cf4b2b13cc17ce0999","size":8040,"noattachment":false,"key":"/dirty/-/dirty-0.9.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-0.9.6.tgz"},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"directories":{},"publish_time":1328481144999,"_cnpm_publish_time":1328481144999,"_hasShrinkwrap":false},"0.9.5":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"0.9.5","dependencies":{},"main":"./lib/dirty","devDependencies":{"gently":">=0.8.0"},"engines":{"node":"*"},"_npmUser":{"name":"felixge","email":"felix@debuggable.com"},"_id":"dirty@0.9.5","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.13-pre","_defaultsLoaded":true,"dist":{"shasum":"ecd886cd5df86ee4a727532f87fba1ed219500c1","size":10240,"noattachment":false,"key":"/dirty/-/dirty-0.9.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-0.9.5.tgz"},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"directories":{},"publish_time":1322484447826,"_cnpm_publish_time":1322484447826,"_hasShrinkwrap":false},"0.9.4":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"0.9.4","dependencies":{},"main":"./lib/dirty","devDependencies":{"gently":">=0.8.0"},"engines":{"node":"*"},"_npmJsonOpts":{"file":"/Users/felix/.npm/dirty/0.9.4/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"dirty@0.9.4","_engineSupported":true,"_npmVersion":"1.0.26","_nodeVersion":"v0.4.10-pre","_defaultsLoaded":true,"dist":{"shasum":"40f3fc1da510a93b5f49f85e59abca64c78ad5ce","size":8180,"noattachment":false,"key":"/dirty/-/dirty-0.9.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-0.9.4.tgz"},"scripts":{},"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"directories":{},"publish_time":1316203921939,"_cnpm_publish_time":1316203921939,"_hasShrinkwrap":false},"0.9.2":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"0.9.2","dependencies":{"gently":">=0.8.0"},"main":"./lib/dirty","devDependencies":{},"engines":{"node":"*"},"_id":"dirty@0.9.2","_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.4.9-pre","_defaultsLoaded":true,"dist":{"shasum":"d7cdc97de927c10b42709ddea7148f68f8f6753b","size":7532,"noattachment":false,"key":"/dirty/-/dirty-0.9.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-0.9.2.tgz"},"scripts":{},"directories":{},"publish_time":1306244615345,"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"_cnpm_publish_time":1306244615345,"_hasShrinkwrap":false},"0.9.1":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"0.9.1","dependencies":{"gently":">=0.8.0"},"main":"./lib/dirty","_id":"dirty@0.9.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.10-1","_nodeVersion":"v0.3.5-pre","dist":{"shasum":"b37e8a2461cb63c89179d39044c6bc86aebdb9c7","size":7896,"noattachment":false,"key":"/dirty/-/dirty-0.9.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-0.9.1.tgz"},"directories":{},"publish_time":1294921299554,"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"_cnpm_publish_time":1294921299554,"_hasShrinkwrap":false},"0.9.0":{"name":"dirty","description":"A tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.","version":"0.9.0","dependencies":{"gently":">=0.8.0"},"main":"./lib/dirty","_id":"dirty@0.9.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"shasum":"2609e67e2e4b50f9d561fffb2fd621a43e9ea537","size":107621,"noattachment":false,"key":"/dirty/-/dirty-0.9.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dirty/download/dirty-0.9.0.tgz"},"directories":{},"publish_time":1294921299554,"maintainers":[{"name":"bentaber","email":"ben.taber@gmail.com"},{"name":"distracteddev","email":"lalkaka.zeus@gmail.com"},{"name":"felixge","email":"felix@debuggable.com"},{"name":"havvy","email":"ryan.havvy@gmail.com"},{"name":"younggi","email":"roadlamp@gmail.com"}],"_cnpm_publish_time":1294921299554,"_hasShrinkwrap":false}},"readme":"# node-dirty\n\n## Purpose\n\nA tiny & fast key value store with append-only disk log. Ideal for apps with < 1 million records.\n\n## Installation\n\n```bash\nnpm install dirty\n```\n\n## Why dirty?\n\nThis module is called dirty because:\n\n* The file format is newline separated JSON\n* Your database lives in the same process as your application, they share memory\n* There is no query language, you just `forEach` through all records\n\nSo dirty means that you will hit a very hard wall with this database after ~1 million records,\nbut it is a wonderful solution for anything smaller than that.\n\n## Tutorial\n\n```javascript\n  var Dirty = require('dirty');\n  var db = new Dirty('user.db');\n\n  db.on('load', function() {\n    db.set('john', {eyes: 'blue'});\n    console.log('Added john, he has %s eyes.', db.get('john').eyes);\n\n    db.set('bob', {eyes: 'brown'}, function() {\n      console.log('User bob is now saved on disk.')\n    });\n\n    db.forEach(function(key, val) {\n      console.log('Found key: %s, val: %j', key, val);\n    });\n  });\n\n  db.on('drain', function() {\n    console.log('All records are saved on disk now.');\n  });\n```\nOutput:\n\n    Added john, he has blue eyes.\n    Found key: john, val: {\"eyes\":\"blue\"}\n    Found key: bob, val: {\"eyes\":\"brown\"}\n    User bob is now saved on disk.\n    All records are saved on disk now.\n\n## API\n\n### new Dirty([path])\n\nCreates a new dirty database. If `path` does not exist yet, it is created. You\ncan also omit the `path` if you don't want disk persistence (useful for testing).\n\n### dirty.path\n\nThe path of the dirty database.\n\n### dirty.set(key, value, [cb])\n\nSet's the given `key` / `val` pair. The state of the database is affected instantly,\nthe optional `cb` callback is fired when the record was written to disk.\n\n`val` can be any JSON-serializable type, it does not have to be an object.\n\n### dirty.get(key)\n\nRetrieves the value for the given `key`.\n\n### dirty.rm(key, cb)\n\nRemoves the record with the given `key`. This is identical to setting the `key`'s value\nto `undefined`.\n\n### dirty.update(key, updater, [cb])\n\nUpdates the record of the given `key` with the given `updater` which is a function\nthat is passed the current value of the key.\n\nThe optional `cb` callback is passed to `dirty.set`.\n\n### dirty.forEach(fn)\n\nCalls the given `fn` function for every document in the database. The passed\narguments are `key` and `val`. You can return `false` to abort a query (useful\nif you are only interested in a limited number of records).\n\nThis function is blocking and runs at ~4 Mhz.\n\n### dirty.close()\n\nClose the dirty db file handle.\n\n### dirty event: 'load' (length)\n\nEmitted once the database file has finished loading. It is not safe to access\nrecords before this event fires. Writing records however should be fine.\n\n`length` is the amount of records the database is holding. This only counts each\nkey once, even if it had been overwritten.\n\nYou can chain the on load to the contructor as follows:\n\n```javascript\nvar db = dirty(file).on('load', function() { ... });\n```\n\n### dirty event: 'drain' ()\n\nEmitted whenever all records have been written to disk.\n\n### dirty event: 'read_close' ()\n\nEmitted once the database file read stream closed.\n\n### dirty event : 'write_close' ()\n\nEmitted once the database file write stream closed.\n\n## Tests\n\n[![Build Status](https://travis-ci.org/felixge/node-dirty.png)](https://travis-ci.org/felixge/node-dirty)\n\nDirty utilizes the [Mocha](http://mochajs.org/) test framework.\n\n```bash\ngit clone https://github.com/felixge/node-dirty\ncd node-dirty\nnpm install\nnpm test\n```\n\n## License\n\nnode-dirty is licensed under the MIT license.\n","_attachments":{},"homepage":"https://github.com/felixge/node-dirty#readme","bugs":{"url":"https://github.com/felixge/node-dirty/issues"},"license":"MIT"}