{"_id":"mongo-watch","_rev":"60-fc4eccbf84a3803bf41c1dcd6e35cffc","name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","dist-tags":{"latest":"0.2.8"},"versions":{"0.0.5":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.0.5","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","mongodb":"*","async":"*"},"devDependencies":{"mocha":"*","lodash":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.0.5","dist":{"shasum":"5b7d7cfff7698d666c1dba441f31fe74d89d45d7","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.0.5.tgz","integrity":"sha512-TswTXRxqu40fWg+bDkxBjGh69mkYNp0rN6PwWBlwaoG3Cx9xoEVUa5/ECDzila6OS6WyeYlNdneKxcT+kuXXzQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcy5Wgs4zVqLbo6SLx9nY2L7CIZMQSjUNTQOsGvaYLxAIgeWHWQfWMpUsnjxCZzhT4InvgCulGFAR7j8uRltWiDWY="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.6":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.0.6","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","mongodb":"*","async":"*"},"devDependencies":{"mocha":"*","lodash":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.0.6","dist":{"shasum":"6d506f7799384cb7889ddb228dc8eaaa972f24e4","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.0.6.tgz","integrity":"sha512-SnsDnGDjtUFPlG8yVE9wTjgK4W+ASpp5z+xvURBUl9k7vfiSSOT7OBMAg3r8IYPOF7I64VdqBDMiZGN+3xVO0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjC4e75droCRA89/eTbkrec0Ic08GKrfn+RmRCiWAEqAIgEaTjxdzL60OJEFcfqyXdNadbctE2itqEO0MqNCaUgYs="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.7":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.0.7","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","mongodb":"*","async":"*"},"devDependencies":{"mocha":"*","lodash":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.0.7","dist":{"shasum":"ae50ab521b4c272d34505fd344120b4ac8fb2f6e","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.0.7.tgz","integrity":"sha512-9JQ6NutAfGKCpNfEXe9IW8Lhjbog7CeZX+lzJu53eTo63frY0AWN6JMbkscmZ1LDL6zjGcNZD1UwNrdf97FsLg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQGSJ30VPdfjla9VLffcbBpfXr82dbi80Lj+ZE8Qgo6QIgMlFXUR1EI3aqEIVu1b5nEpVRyXZo2ZJ0ESkekGt9w+U="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.0":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.0","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","ale":"*","qi":"*","lodash":"*","relcache":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.1.0","dist":{"shasum":"73d4982c713430ece6c77856f730ef2f1d9c8420","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.0.tgz","integrity":"sha512-9xaO6DR5tdmu+xJzWsYIGRDnVeo02E40nkDp8kZ3LCs7r0fhKLkom5H293OXll9DlOICBlLZrsOA6Vhh9ByOtw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC0sXKzUZI9tL//yUYEfI7Ea+XwheModpsP0lmgGnevwAiBp8y3XTWxpayHUGNDLaTpV5bdxLwuX0r8Y4AqJYiihqw=="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.1":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.1","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","ale":"*","qi":"*","lodash":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.1.1","dist":{"shasum":"a1aa313a96c28c65855714fa6985ccca1e01a49a","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.1.tgz","integrity":"sha512-o6zhAATleJ2u+wEYqdSMa5xjHvxgGU6ahYelEyh5OQ1i7/BmbXz4YXdC1fK9rziGPb4wolgGjahtRYljY1ehmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/+tlMy9uYJk/T18VqlBXwtVbmyfC2CiJKjbNJKHws4wIhAMkkg9HPDWrjG7nfBb8ak6mDR4umULTCgBOaWfdvnnnn"}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.2":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.2","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","ale":"*","qi":"*","lodash":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.1.2","dist":{"shasum":"f1246269280e9c62f3b2c8ac43af6c31cc9e05ca","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.2.tgz","integrity":"sha512-psEZWiJf1K9rWx4gjS/Re55LD3MjF8UZmONaVzH0iBoWADl4Ev1653pvg7jNFxDJfEK5mZ8fsvtNFXeRoyO9cA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCpXKeJFnsCaK/1QOXXQ1MeRd90OrqKbnnclHGNnUbEAIhAL+Fr5NIhm2kckEQr4NFiQ/QvXVMjqZK0JZOPyls98pC"}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.3":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.3","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","ale":"*","qi":"*","lodash":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.1.3","dist":{"shasum":"9bb71bd13f25f628c11de3c20e43ab472064a7db","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.3.tgz","integrity":"sha512-Ca5TmgzvOytW3yvlennUMameJBNvc3LWqA23gO3ZQ8mG12S5yDQFGrJqLV530vbC6yB+R0NfbzSUS5dI1F0SFQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHch2lI3JHa5HCTdjkse+TCYsYgLq0NkAPjb1fG4ElxgAiBj55Wu6zo+O9rNj/qU3SP1XHsZ97R3I01ZLKx6LA1eQw=="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.4":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.4","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","torch":"*","qi":"*","lodash":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.1.4","dist":{"shasum":"de5027e901f46a3413d589a580d4b5ebc287eb24","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.4.tgz","integrity":"sha512-kBvIESsmAe6awqaRD3828vt4HrMgNekBI8gNjHyWOLoO1M+7T59GZskXxA0Jzef4zFVHNLtuA+qO3r1HwL9c5Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBrWX1KucY4zcrSXP7tLmAQF0fGWidRyFj20QRnR5RYcAiB6GAx5NwnwVhbUMOIwRc3O2hJggfyoZ9tc+GXosIrTog=="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.5":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.5","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","torch":"*","qi":"*","lodash":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.1.5","dist":{"shasum":"70ea52d5b81648f9b1655f85ae898e66dcf96558","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.5.tgz","integrity":"sha512-e5vqZzZsiLb1jEN+Pr5X/GQtK8iBHHh2Bsg+d39Wda+xdqWwjPVqhBQVNRdSBZgmsxzkqWqqtjSuNBKmEt+FmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAm+Kz9nWNjpUlcJ3FkgWNMAC8Jd40podSlyvwOinh6rAiBMFtifLJBEr+aQARbda3oLRpHx0mHFC7umBaH3JCw+HQ=="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.6":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.6","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","torch":"*","qi":"*","lodash":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.1.6","dist":{"shasum":"5c01c05e051af1894659e7c3e37ffc2481479bc1","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.6.tgz","integrity":"sha512-gAdq3NmykTcvKNReGIZ6eY91FrnJpIeBiQasJtUbAyd0zF56/IDFD2HG7m/bNLg162+Ro94yKvWSVLGM37CLCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQ22i6UA1U9ANY7QwAOtfNYgVWdp/9HOntA7tUVWrjEgIhAK30xiJAE2RG2kgQkldjenXifYM6WmAIrSNLUU5gkQGS"}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.7":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.7","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","torch":"*","qi":"*","lodash":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.1.7","dist":{"shasum":"30f96a52715fb5c2bc21c7e7b83863c9b7e36424","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.7.tgz","integrity":"sha512-D4qTQ8GZDqXMymqZS4FTwqM+Z000CC0hjcgnuN+CqSCFnpGBbwJEMO7u1+3NBFClxToi527KbmQlVmywefPGxg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwSb5SdCuk7gIawh5DuBPyNc+VXDPSkFoLYpYy5gD5bQIhAMtZBJ+lU8OBvFewApZhnm6eGDHr0/n2/gBFn1T7NlA9"}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.9":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.9","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","torch":"*","qi":"*","lodash":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.1.9","dist":{"shasum":"dcf9ecdb369a73308da7088cc3e0143eb49f4513","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.9.tgz","integrity":"sha512-n5nH59RzYMobGH3Rb+Ok2EbpEXlhNZnmqyTQ/bWv/HFSkZgTlFENnHkB5Erl7SiyvvyzBMEHWodEXHMRPj/4LQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/C8qnYJ8+YvUUgSK2Dv5yA2Fhuuh4GXMOHMTjtmKy7AiAa4kO3E911hEJnwlMkSQQSOXDZUTwQFW+hN4WbE16aqg=="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.10":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.10","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","torch":"*","qi":"*","lodash":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.1.10","dist":{"shasum":"7e3366f89341e3474fed87b52fcebda212272035","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.10.tgz","integrity":"sha512-ELlDeTeZVpSAuCzRBcLK+SWvMsyHsk+TNJh1MI+kXgvppXRG8NMCYH5Oq7xxtbLJZpLPfsbMmwhmp5rgl9ii+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClRdhTWtRkq9Jpt7TiON73crmoMV6oa5H+scICkpiccQIhAJIVc4qGwErKEKaO6j3fLrvN3z4MDqEwEvEV558gE4y/"}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.11":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.11","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","torch":"*","qi":"*","lodash":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"_id":"mongo-watch@0.1.11","dist":{"shasum":"ddb24aedd2b5ff087c8bca79ce7adbc98e1dfc19","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.11.tgz","integrity":"sha512-7yx3986ziC177qimwTa+rjEGvGxCwy3A+WH+EBqR7fzbPYdP9sKfVW8yccaY3a/gY2EPrZrDcbaj7qACOdwM2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGL2AMNNKodWYvT9vLN1bwYG/YKRiq+BDg2nn9/K5JvxAiEArufF1FHveD8Nf9oemnE2D2QVX9KpiQut+CZBvi8oI7Q="}]},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.12":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.1.12","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","torch":"*","qi":"*","lodash":"*","mongodb":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/mongo-watcher/issues"},"_id":"mongo-watch@0.1.12","dist":{"shasum":"06555a31fac9bc164a9425f4729412201a672fb2","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.1.12.tgz","integrity":"sha512-0I8UGkePhgaltmcVR5vSVl8hJJuNiHG1IwPN75k2JtWTrYzId6s/iaME+sJfEP1oes9+KvK0YGrudWcQBOaAVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDBz7UveLBlzRkyK1fj0OS8WJx5CfYHANDRXk1yOWHewIgNOQd+jNPnD7sg3MwT5ZphJwa6HaIuUMHtsHCIleVYKI="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.0":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.2.0","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","mongodb":"*","async":"*"},"devDependencies":{"mocha":"*","lodash":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/mongo-watcher/issues"},"_id":"mongo-watch@0.2.0","dist":{"shasum":"fd4b4d7ef8c17076b14a8a7f41c6b901ca17c608","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.2.0.tgz","integrity":"sha512-PSIwZYL7DrGvu8UonCwvlrFCesj75cN1FBZ5ALa2AEkB3KpVZpFmfufcD4tsaGt1n7etyaL96/1Id3cV088BsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGE5W4ZUAJrE0NkKwPCQ/cgYrVre65BhPtU4j6uMT8rQIgaY6Wk5vLREWoZLgVfLAg1UgYQ3b/wHONfIcheFzXpAU="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.1":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.2.1","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","mongodb":"*","async":"*"},"devDependencies":{"mocha":"*","lodash":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/mongo-watcher/issues"},"_id":"mongo-watch@0.2.1","dist":{"shasum":"58650ef69a9b120bc06b4a01e25a055c59beb055","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.2.1.tgz","integrity":"sha512-ItNKeUkjhPqIJQkDUO+ezLQCtuU/CIhUp2IbwqqYfeObEZSTADczoKv/Tfkg0vm+PVr/cUXZClOVOMqzUaUfcg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAhEb0ksV7/6XOKB+0RlfWonIx+Ic2nQ1eHHDkCnRle2AiB4MX4TJtPQg1cjS9ApRnu1HAtuQNqKwJiLQmQ5ls2Mdw=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.2":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.2.2","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":">1.7.0","mongodb":"*","async":"*"},"devDependencies":{"mocha":"*","lodash":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/mongo-watcher/issues"},"_id":"mongo-watch@0.2.2","dist":{"shasum":"518bdd2d7fe8a37297ec4ce097ca7eabb6d408fd","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.2.2.tgz","integrity":"sha512-yqo5VTXal46XfzX/o+DlS9IoAUCZvZ+B2LhwqbZiYunIsb/OPIWumnNtxDZNlW01c1Nowut8TAXI8JMFqhdtSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCv0Yesdks0qoodiIQv3E7lshCJPzqFKMX3Katl+XbRAQIhALHrAEsyBDDy1naPhEY0hcbjo2xeav0MBpadqFsmxeIa"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.3":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.2.3","homepage":"http://github.com/TorchlightSoftware/mongo-watcher","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watcher.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":">1.7.0","mongodb":"*","async":"*"},"devDependencies":{"mocha":"*","lodash":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watcher/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/mongo-watcher/issues"},"_id":"mongo-watch@0.2.3","dist":{"shasum":"316f403983b7ec7dac2002373c2c2e2db2da0522","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.2.3.tgz","integrity":"sha512-4KvRJmMXmIKrlna266zTRCKIsqBPOBIIfySIVf7TI+T/EQ/o2OTmviwUtOoGABuV56FvBpY8FyfbQnizvwzDtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFIZNBeCNmjrwQ9rIw0SiuNGVvY5YYRkFdCumIjEsAddAiEAip9K6DqR+xQKNmhV+e2hipwWgpSu+AhbYdTW8rbm8hs="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.4":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.2.4","homepage":"http://github.com/TorchlightSoftware/mongo-watch","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watch.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":">1.7.0","mongodb":"*","async":"*"},"devDependencies":{"mocha":"*","lodash":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watch/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/mongo-watch/issues"},"_id":"mongo-watch@0.2.4","dist":{"shasum":"7a6e42e9bf671af7de9117244ad13655507e8abd","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.2.4.tgz","integrity":"sha512-sIS8hIXHRo4ouzwIwXt3G6mOFks9V9aIjPiViGz0DLGbC+cR5mwYAJXe3QaCS9s9TZcUiv7OPTZOOS74j5zqsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDb42SVbvIyNIp8JQgViZmcZhoV6zivoe1Y+UY9FpctAAIhAIUjDCBzbSXacIKJplca5KkDYaR1URvKLO+o1HYEXYFI"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.6":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.2.6","homepage":"http://github.com/TorchlightSoftware/mongo-watch","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watch.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":">1.7.0","mongodb":"*","lodash":"*","async":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watch/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/mongo-watch/issues"},"_id":"mongo-watch@0.2.6","dist":{"shasum":"c87ab15788b3fa44e33a0cb19b2bcfbac83e17b9","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.2.6.tgz","integrity":"sha512-T8fqGgIuxtIAZ1NQm7gGZDbVtnejpT3WOMLZ+W4w7DgLKwR/EaF9/IYjV3J/qRRMqL3j2cXwe4zsymOqXF0Wug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEM5awxXVADfREydgU2g1+2MU+io5EeaVviEXe8gNORgAiAZMnQhJ31g8kSM261JdHOIH37uQi79JM8C9RQj1Ap4NA=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.7":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.2.7","homepage":"http://github.com/TorchlightSoftware/mongo-watch","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watch.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":">1.7.0","mongodb":"*","lodash":"*","async":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watch/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"gitHead":"e7930fe8792de76cc905896b59c30a4f2d759e0d","bugs":{"url":"https://github.com/TorchlightSoftware/mongo-watch/issues"},"_id":"mongo-watch@0.2.7","_shasum":"b0438948dbcb11c29b9d70882cebc2a8ac5dbcba","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"dist":{"shasum":"b0438948dbcb11c29b9d70882cebc2a8ac5dbcba","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.2.7.tgz","integrity":"sha512-vXI8MgWYSTR4kah5PVAyviF5oTPp4mEpoOnqTNVKvQ3/UcfqTe00K+63O7UqEvNrSfXe6D+mdKv5oC0iz+5F1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTgMDrb9g6+VNVrKsUQcg2c8Erz0RKsGdKCjrHvc9YegIgSHB7iypXisXtGelKZG/7MJI8TSms04m1zDGuXl06bTw="}]},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.2.8":{"name":"mongo-watch","description":"A mongo watcher.  This ties into the MongoDB replication oplog, and exposes all data modifications via an EventEmitter.","version":"0.2.8","homepage":"http://github.com/TorchlightSoftware/mongo-watch","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watch.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":">1.7.0","mongodb":"*","lodash":"*","async":"*"},"devDependencies":{"mocha":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":"http://github.com/torchlightsoftware/mongo-watch/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"gitHead":"b2166068669b614389c61e6de4af3410b390cf72","bugs":{"url":"https://github.com/TorchlightSoftware/mongo-watch/issues"},"_id":"mongo-watch@0.2.8","_shasum":"9eee95cb675d83f3344601f53038a7f8f047349b","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"dist":{"shasum":"9eee95cb675d83f3344601f53038a7f8f047349b","tarball":"https://registry.npmjs.org/mongo-watch/-/mongo-watch-0.2.8.tgz","integrity":"sha512-Zqvau7cXz7P7SvsquJtyuKS+zAbtHyiouaE8vKrWY+5qo32N82rgSIsabI8dO0e197FshL2zlaBOzuTGCBnuGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXZZoa8hHW8AhTsMDRePd+rkpGqNGSkTxR/bdwcuaZcAIgZTlGD8DAP27hvxqni0646Yo0YWEV9ORJwb2oAmCHxIA="}]},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"readme":"# Mongo Watch\n\nThis watcher ties into the MongoDB replication log (local.oplog.rs) by default, but you can also tie into local.oplog.$main on a master DB. It then notifies your watchers any time the data changes.\n\nIn order to use this you must:\n\n*replication log*\n\n1. Have access to the oplog.  This will not be available on shared DB hosting, as it would reveal everyone else's database transactions to you.\n2. Have replication enabled.  This can be done by starting mongod with the option `--replSet someArbitraryName`.  You must then call `rs.initiate()` from the mongo CLI.\n\n*master log*\n\n1. Have access to the oplog.  This will not be available on shared DB hosting, as it would reveal everyone else's database transactions to you.\n2. Start your mongod as `--master`.\n3. Use: `new MongoWatch({useMasterOplog:true})`\n\nThe watcher is fairly low latency and overhead.  On my machine a test with a single insert and watcher takes 20ms.  The cursor used to tail the oplog is being initialized with {awaitdata: true} so the data should be getting pushed from MongoDB's internal mechanism, instead of polling.\n\nBecause the watcher ties in to the oplog, this solution should scale with you as you add more MongoDB nodes, and allow any corresponding application instances to be notified of the same state changes.  I have not yet set up a cluster to test this, so I would welcome any comments or feedback you might have.\n\nHappy event driven programming!  8-)\n\n**Note:** The query functionality previously supported in 0.1.12 is now deprecated.  This code will be moved to [Particle](https://github.com/torchlightsoftware/particle).  Sorry for any inconvenience, but I determined this would be a much cleaner place to separate the APIs and respective responsibilities of the libraries.\n\n## Install\n\n```bash\nnpm install mongo-watch\n```\n\n## Usage\n\nWatching a collection is as easy as:\n\n```coffee-script\nMongoWatch = require 'mongo-watch'\n\nwatcher = new MongoWatch {format: 'pretty'}\n\n# watch the collection\nwatcher.watch 'test.users', (event) ->\n\n  # parse the results\n  console.log 'something changed:', event\n```\n\nNow when you run an insert you should see the event get logged by the code above.\n\n```coffee-script\n# create db client for a test transaction\n{Server, Db} = require 'mongodb'\nclient = new Db 'test', new Server('localhost', 27017), {w: 1}\nclient.open ->\n  client.collection 'users', (err, users) ->\n\n    # fire off an update that will trigger the watcher\n    users.insert {email: 'graham@daventry.com'}, ->\n```\n\n## Options\n\nSee the applyDefaults function in [lib/main.coffee](https://github.com/TorchlightSoftware/mongo-watch/blob/master/lib/main.coffee) for a list of options and their defaults.\n\nSee the tests for more examples.\n\n## Authentication\n\nPass the \"username\" and \"password\" options.\n\n```coffee\nwatcher = new MongoWatch {username: 'bobross', password: 'happytrees'}\n```\n\n## Replica sets\n\nIf you pass a replicaSet array it will be used to establish a connection.\nIt should keep working in case the primary changes - i.e. when it dies, and secondary takes it place.\n\n```coffee\nwatcher = new MongoWatch {\n    replicaSet: [\n        {host: \"currentPrimary.mongoexample.com\", port : 10453},\n        {host: \"currentSecondary.mongoexample.com\", port : 10452}\n    ]\n}\n```\n\n## Debugging\n\nIf you pass the onDebug option with a function of your choice, it will be notified of major events in the listener lifecycle.  This is useful for troubleshooting if you're not receiving the notifications you expect.\n\n```coffee\nwatcher = new MongoWatch {onDebug: console.log}\n```\n\nFor reference, here is output taken from the test 'Mongo Watch - insert should emit an event'.  You should expect an output similar to this, and if it's breaking down you should be able to see why from the last event that was fired.  Are you listening to the right collection?\n\n```bash\nReady: false\nEmiting 'connected'. Stream exists: true\nAdding emitter for: { collection: 'test.users' }\nAdding listener on: { collection: 'test.users' }\nData changed: { data:\n   { ts: { _bsontype: 'Timestamp', low_: 1, high_: 1362553757 },\n     h: { _bsontype: 'Long', low_: -1091839621, high_: 386723518 },\n     op: 'i',\n     ns: 'test.users',\n     o: { email: 'graham@daventry.com', _id: 5136eb9d19bd55597e000001 } },\n  watching: 'test.users',\n  relevant: true }\nEmitting event: { channel: 'change:test.users',\n  event:\n   { ts: { _bsontype: 'Timestamp', low_: 1, high_: 1362553757 },\n     h: { _bsontype: 'Long', low_: -1091839621, high_: 386723518 },\n     op: 'i',\n     ns: 'test.users',\n     o: { email: 'graham@daventry.com', _id: 5136eb9d19bd55597e000001 } } }\nRemoving listeners for: test.users\n```\n\n## Credits\n\n[Kristina Chodorow](http://www.kchodorow.com/blog/2010/10/12/replication-internals/) was very helpful both in documenting the oplog in her blog posts, and in answering some of my questions.  Christian Kvalheim's [code](https://github.com/christkv/realtime/blob/master/lib/app/dataproviders/flow_data_provider.js) served as the basis for the cursor connection.\n\n## Contributing\n\nPull requests welcome!  Please create a feature branch instead of submitting directly to master.  This will help me test/verify before merging.\n\n## LICENSE\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"email":"b@tlsft.com","name":"tlsft"}],"time":{"modified":"2022-08-31T23:06:18.215Z","created":"2013-03-13T22:43:23.726Z","0.0.5":"2013-03-13T22:43:24.941Z","0.0.6":"2013-03-17T01:08:37.902Z","0.0.7":"2013-06-25T00:52:38.880Z","0.1.0":"2013-07-15T20:21:07.878Z","0.1.1":"2013-07-19T06:05:33.548Z","0.1.2":"2013-07-23T00:32:57.511Z","0.1.3":"2013-08-05T21:06:17.284Z","0.1.4":"2013-08-05T22:41:06.365Z","0.1.5":"2013-08-07T17:37:51.744Z","0.1.6":"2013-08-07T18:00:53.068Z","0.1.7":"2013-08-09T00:45:24.936Z","0.1.9":"2013-08-11T23:37:49.308Z","0.1.10":"2013-08-12T05:21:18.565Z","0.1.11":"2013-08-12T22:51:07.250Z","0.1.12":"2013-11-22T00:12:51.631Z","0.2.0":"2013-11-22T00:45:25.897Z","0.2.1":"2013-11-25T23:29:48.244Z","0.2.2":"2014-03-04T18:12:59.575Z","0.2.3":"2014-05-01T16:52:58.086Z","0.2.4":"2014-05-01T17:22:33.596Z","0.2.6":"2014-06-01T15:52:50.026Z","0.2.7":"2014-07-16T20:20:18.106Z","0.2.8":"2014-11-04T06:31:38.783Z"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com","url":"http://torchlightsoftware.com"},"repository":{"type":"git","url":"git://github.com/TorchlightSoftware/mongo-watch.git"},"homepage":"http://github.com/TorchlightSoftware/mongo-watch","bugs":{"url":"https://github.com/TorchlightSoftware/mongo-watch/issues"},"readmeFilename":"README.md","users":{"taterbase":true,"c1freitas":true,"ricurdofh":true,"tobiasnickel":true,"nickeltobias":true,"hongbo-miao":true,"davicrystal":true}}