{"name":"level-post","description":"get consistent post hooks for leveldb.","version":"1.0.2","homepage":"https://github.com/dominictarr/level-post","repository":{"type":"git","url":"git://github.com/dominictarr/level-post.git"},"dependencies":{"string-range":"~1.2.1"},"devDependencies":{"tape":"~1.0.4","level-test":"~1.3.0"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","bugs":{"url":"https://github.com/dominictarr/level-post/issues"},"_id":"level-post@1.0.2","dist":{"shasum":"b95638c0370c06a75d37abf9842d74b3d2b77189","tarball":"http://registry-npm.ywwl.com/level-post/download/level-post-1.0.2.tgz","integrity":"sha512-QOm0n53sodEjmAzAPO9XSaOQjbhsJFe9DfztDwqdAoXlWY9wHuTaS4cwRNq5EklMDSxFpx4Qm1bFmEd6Dvg4ng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7W0Hsgq0zZmmzzyKa4UNDNcrUto4xBHuiRlS0zTUhZQIgfcqxixLq1qn0egIymaJ3wf2RydvGIyTEM7aqJLCrhg0="}],"size":1883,"noattachment":false,"key":"/level-post/-/level-post-1.0.2.tgz"},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"}],"directories":{},"readme":"# level-post\n\nget consistent post hooks for leveldb.\n\n[![travis](https://travis-ci.org/dominictarr/level-post.png?branch=master)\n](https://travis-ci.org/dominictarr/level-post)\n\n[![testling](http://ci.testling.com/dominictarr/level-post.png)\n](http://ci.testling.com/dominictarr/level-post)\n\n``` js\nvar level = require('level')\n\nvar db = level('/tmp/whatever-db')\n\npost(db, function (op) {\n  //this is called after every put, del, or batch\n  console.log(op)\n})\n\ndb.put('foo', 'bar', function (err) {\n  //...\n})\n```\n\n# methods\n\n## post(db, opts={}, cb)\n\nCreate a hook to listen for database events matching the constraints in `opts`.\n`cb(op)` fires for each matching operation for `op`, an object with `type`,\n`key`, and `value` properties.\n\nYou can use these keys as constraints, just like level core:\n\n* `opts.gte`, `opts.start`, `opts.min` - greater than or equal to\n* `opts.gt` - greater than\n* `opts.lte`, `opts.end`, `opts.max` - less than or equal to\n* `opts.lt` - less than\n\nYou can also specify a keyEncoding with `opts.keyEncoding`. If there was a\nkeyEncoding set up by leveldb in the constructor (at `db.options.keyEncoding`),\nthat one will be used.\n\n## License\n\nMIT\n","publish_time":1371567454212,"_cnpm_publish_time":1371567454212,"dist-tags":{"latest":"1.0.7"}}