{"_id":"hyperemitter","_rev":"14-59f6ec8d65c1971f106af407e48ab240","name":"hyperemitter","description":"Horizontally Scalable EventEmitter powered by a Merkle DAG","dist-tags":{"latest":"1.3.0"},"versions":{"0.0.1":{"name":"hyperemitter","version":"0.0.1","description":"Horizontally Scalable Event-Store powered by a Merkle DAG","main":"hyperemitter.js","scripts":{"test":"tape test.js | faucet","lint":"standard"},"bin":{"hypem":"./bin.js"},"pre-commit":["lint","test"],"keywords":["event","store","eventstore","emitter","merkle","dag"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"ISC","repository":{"type":"git","url":"https://github.com/mcollina/hyperemitter.git"},"devDependencies":{"faucet":"0.0.1","minimist":"^1.1.1","pre-commit":"^1.0.6","standard":"^3.7.1","tape":"^4.0.0"},"dependencies":{"cuid":"^1.2.4","deep-equal":"^1.0.0","duplexify":"^3.3.0","end-of-stream":"^1.1.0","fastparallel":"^1.5.0","hyperlog":"^3.3.1","level":"^0.18.0","memdb":"^0.2.0","mutexify":"^1.0.1","ndjson":"^1.3.0","protocol-buffers":"^3.0.0","pump":"^1.0.0","through2":"^0.6.5","tmpdir":"^1.0.1","xtend":"^4.0.0"},"gitHead":"31c3b8384ce390f7fe27b81127dbb3aa64954060","bugs":{"url":"https://github.com/mcollina/hyperemitter/issues"},"homepage":"https://github.com/mcollina/hyperemitter","_id":"hyperemitter@0.0.1","_shasum":"10100089151278e7a7a28633a766b5c600e8987f","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.36","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"dist":{"shasum":"10100089151278e7a7a28633a766b5c600e8987f","tarball":"https://registry.npmjs.org/hyperemitter/-/hyperemitter-0.0.1.tgz","integrity":"sha512-5giXwji2hLSiS9jN0SBwLCUrNq4yUoAzma3KeJJQVhf2P2wj20EIJ2fA7t7W3D6D5cq/6DdlkhWY7AX/cI2KTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDxj4mrDbJvV7z/ELaEbSiXFfbqfSwzploIMS0dmiQySAiEAifLfzUP0z+ZQwp436r5L/67gtTPGCi1TprqL5j9BI1Y="}]}},"1.0.0":{"name":"hyperemitter","version":"1.0.0","description":"Horizontally Scalable EventEmitter powered by a Merkle DAG","main":"hyperemitter.js","scripts":{"test":"tape test.js | faucet","lint":"standard"},"bin":{"hypem":"./bin.js"},"pre-commit":["lint","test"],"keywords":["event","store","eventstore","emitter","merkle","dag"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"ISC","repository":{"type":"git","url":"https://github.com/mcollina/hyperemitter.git"},"devDependencies":{"faucet":"0.0.1","minimist":"^1.1.1","pre-commit":"^1.0.6","standard":"^3.7.1","tape":"^4.0.0"},"dependencies":{"cuid":"^1.2.4","deep-equal":"^1.0.0","duplexify":"^3.3.0","end-of-stream":"^1.1.0","fastparallel":"^1.5.0","hyperlog":"^3.3.1","level":"^0.18.0","memdb":"^0.2.0","mutexify":"^1.0.1","ndjson":"^1.3.0","protocol-buffers":"^3.0.0","pump":"^1.0.0","through2":"^0.6.5","tmpdir":"^1.0.1","xtend":"^4.0.0"},"gitHead":"7eb55515a3e1795282860846ce2c71c9511fcb2c","bugs":{"url":"https://github.com/mcollina/hyperemitter/issues"},"homepage":"https://github.com/mcollina/hyperemitter","_id":"hyperemitter@1.0.0","_shasum":"2a7620d5f2adb53ba582680dacd11e362921ddeb","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.36","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"dist":{"shasum":"2a7620d5f2adb53ba582680dacd11e362921ddeb","tarball":"https://registry.npmjs.org/hyperemitter/-/hyperemitter-1.0.0.tgz","integrity":"sha512-nFe9InSHmgnQAc1phxs9gUCi9J1vTRFTmd3IaJfYNdy8x+9MSUhULzLkd+hVNf18bK92jGCAtqE0pbKgpAZZrg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEqyniiz6xhgqDy1klxrsPvtAdbX4vHtYvg10uqLVPhhAiAkWaiTzZ5RxAPuiTUda5iCXuErHm1NGjBwZnBJ/N3dcQ=="}]}},"1.0.1":{"name":"hyperemitter","version":"1.0.1","description":"Horizontally Scalable EventEmitter powered by a Merkle DAG","main":"hyperemitter.js","scripts":{"test":"tape test.js | faucet","lint":"standard"},"bin":{"hypem":"./bin.js"},"pre-commit":["lint","test"],"keywords":["event","store","eventstore","emitter","merkle","dag"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"ISC","repository":{"type":"git","url":"https://github.com/mcollina/hyperemitter.git"},"devDependencies":{"faucet":"0.0.1","minimist":"^1.1.1","pre-commit":"^1.0.6","standard":"^3.7.1","tape":"^4.0.0"},"dependencies":{"cuid":"^1.2.4","deep-equal":"^1.0.0","duplexify":"^3.3.0","end-of-stream":"^1.1.0","fastparallel":"^1.5.0","hyperlog":"^3.3.1","level":"^0.18.0","memdb":"^0.2.0","minimist":"^1.1.1","ndjson":"^1.3.0","protocol-buffers":"^3.0.0","pump":"^1.0.0","through2":"^0.6.5","xtend":"^4.0.0"},"gitHead":"59060419b29a5c2ad41a9a5a18f089b55e1f6da2","bugs":{"url":"https://github.com/mcollina/hyperemitter/issues"},"homepage":"https://github.com/mcollina/hyperemitter","_id":"hyperemitter@1.0.1","_shasum":"09bda1901a49aa0ce11282d645092562ed0e83d6","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.36","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"dist":{"shasum":"09bda1901a49aa0ce11282d645092562ed0e83d6","tarball":"https://registry.npmjs.org/hyperemitter/-/hyperemitter-1.0.1.tgz","integrity":"sha512-I2h8/NefZfgeHAgDSdvAn0jRAFLHRlyxYi+TK2XjVl4KSB4xKVLoF8DFEys7P/5ByZvj0mSLPYE+jSTwcxh9mQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxe240e6dyGDGOgE7RRcXaDRceeLMfYU9Se5Gsi2fICgIhAI4SKORAg4AGO7d4mSW5sNQxXicEfO9mJkiRaOSe4oFU"}]}},"1.0.2":{"name":"hyperemitter","version":"1.0.2","description":"Horizontally Scalable EventEmitter powered by a Merkle DAG","main":"hyperemitter.js","scripts":{"test":"tape test.js | faucet","lint":"standard"},"bin":{"hypem":"./bin.js"},"pre-commit":["lint","test"],"keywords":["event","store","eventstore","emitter","merkle","dag"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"ISC","repository":{"type":"git","url":"https://github.com/mcollina/hyperemitter.git"},"devDependencies":{"faucet":"0.0.1","minimist":"^1.1.1","pre-commit":"^1.0.6","standard":"^3.7.1","tape":"^4.0.0"},"dependencies":{"cuid":"^1.2.4","deep-equal":"^1.0.0","duplexify":"^3.3.0","end-of-stream":"^1.1.0","fastparallel":"^1.5.0","hyperlog":"^3.3.1","level":"^0.18.0","memdb":"^0.2.0","minimist":"^1.1.1","ndjson":"^1.3.0","protocol-buffers":"^3.0.0","pump":"^1.0.0","through2":"^0.6.5","xtend":"^4.0.0"},"gitHead":"ea2ba95ef5e0acd5cea8467f409622893967d85b","bugs":{"url":"https://github.com/mcollina/hyperemitter/issues"},"homepage":"https://github.com/mcollina/hyperemitter","_id":"hyperemitter@1.0.2","_shasum":"c7ce20f338da899cd8f784241ebb2ca08d8acf08","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.36","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"dist":{"shasum":"c7ce20f338da899cd8f784241ebb2ca08d8acf08","tarball":"https://registry.npmjs.org/hyperemitter/-/hyperemitter-1.0.2.tgz","integrity":"sha512-P8yf2QFTvyWQ1PnweHEKxFc/CVt7OHafptD6JEyt0QOIEsHDeMwH87B+x24sGoqjl6Ka+Wbz8Yh/rE9eQ7TxgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/cQfCur0MhVcgFk9GFinUw43c1R1B9e5NLq/as1PK2AIhANGOfDbIs0LPUSkLb70dsXDKwiazOlnQG/2tKIWUn7RN"}]}},"1.0.3":{"name":"hyperemitter","version":"1.0.3","description":"Horizontally Scalable EventEmitter powered by a Merkle DAG","main":"hyperemitter.js","scripts":{"test":"tape test.js | faucet","lint":"standard"},"bin":{"hypem":"./bin.js"},"pre-commit":["lint","test"],"keywords":["event","store","eventstore","emitter","merkle","dag"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"ISC","repository":{"type":"git","url":"https://github.com/mcollina/hyperemitter.git"},"devDependencies":{"faucet":"0.0.1","minimist":"^1.1.1","pre-commit":"^1.0.6","standard":"^3.7.1","tape":"^4.0.0"},"dependencies":{"cuid":"^1.2.4","deep-equal":"^1.0.0","duplexify":"^3.3.0","end-of-stream":"^1.1.0","fastparallel":"^1.5.0","hyperlog":"^3.3.1","level":"^0.18.0","memdb":"^0.2.0","minimist":"^1.1.1","ndjson":"^1.3.0","protocol-buffers":"^3.0.0","pump":"^1.0.0","through2":"^0.6.5","xtend":"^4.0.0"},"gitHead":"8efd7bb1b7e2b6fb5edffa41291de1066f904525","bugs":{"url":"https://github.com/mcollina/hyperemitter/issues"},"homepage":"https://github.com/mcollina/hyperemitter","_id":"hyperemitter@1.0.3","_shasum":"170df6c8a57a07826def10c039623d42fda1c5ed","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.36","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"dist":{"shasum":"170df6c8a57a07826def10c039623d42fda1c5ed","tarball":"https://registry.npmjs.org/hyperemitter/-/hyperemitter-1.0.3.tgz","integrity":"sha512-fDiUJ7rjZ0JVRQskedkGzlA5oJPvRg3q9n/x8IRwlQYqmQ10043rKVHXB1gAHfBIS0zx28M5Fj4R/FEVjWmzbw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICuqCibqz1vqCqzjuWrYfqLyq59ZDNuecdPSXJTbDAsdAiAZqc4aUAAMYc7GG7iDTuDFbanpfi6PFs2ZZhzU41Kq3g=="}]}},"1.1.0":{"name":"hyperemitter","version":"1.1.0","description":"Horizontally Scalable EventEmitter powered by a Merkle DAG","main":"hyperemitter.js","scripts":{"test":"tape test.js | faucet","lint":"standard"},"bin":{"hypem":"./bin.js"},"pre-commit":["lint","test"],"keywords":["event","store","eventstore","emitter","merkle","dag"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"ISC","repository":{"type":"git","url":"https://github.com/mcollina/hyperemitter.git"},"devDependencies":{"faucet":"0.0.1","minimist":"^1.1.1","pre-commit":"^1.0.6","standard":"^3.7.1","tape":"^4.0.0"},"dependencies":{"cuid":"^1.2.4","deep-equal":"^1.0.0","duplexify":"^3.3.0","end-of-stream":"^1.1.0","fastparallel":"^1.5.0","hyperlog":"^3.5.0","level":"^0.18.0","memdb":"^0.2.0","minimist":"^1.1.1","ndjson":"^1.3.0","protocol-buffers":"^3.0.0","pump":"^1.0.0","through2":"^0.6.5","xtend":"^4.0.0"},"gitHead":"90a4482035a83a5c2a6108a3a9617fd78ea16355","bugs":{"url":"https://github.com/mcollina/hyperemitter/issues"},"homepage":"https://github.com/mcollina/hyperemitter","_id":"hyperemitter@1.1.0","_shasum":"6262e0aeb2ae0e72375e7f66ca33b9c433c6f8b4","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.36","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"dist":{"shasum":"6262e0aeb2ae0e72375e7f66ca33b9c433c6f8b4","tarball":"https://registry.npmjs.org/hyperemitter/-/hyperemitter-1.1.0.tgz","integrity":"sha512-qgubu9JuNx435iXzp7tCkhcQRAkPUiZx8LyCzxKzwrOiKTNPjkTs6M1GQzBb+cpcnIi/tADO3fRXIepM78ax1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGq023Bt+cp4Xuv1NZW4a13zmzRsF+aaerj4djQKJ/faAiASpcYDbytdto3aJ1FIBNoDv1jPuB6RRruZb982a+K42Q=="}]}},"1.1.1":{"name":"hyperemitter","version":"1.1.1","description":"Horizontally Scalable EventEmitter powered by a Merkle DAG","main":"hyperemitter.js","scripts":{"test":"tape test/test.js | faucet","lint":"standard"},"bin":{"hypem":"./bin.js"},"pre-commit":["lint","test"],"keywords":["event","store","eventstore","emitter","merkle","dag"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"ISC","repository":{"type":"git","url":"https://github.com/mcollina/hyperemitter.git"},"devDependencies":{"faucet":"0.0.1","minimist":"^1.1.1","pre-commit":"^1.0.6","standard":"^3.7.1","tape":"^4.0.0"},"dependencies":{"cuid":"^1.2.4","deep-equal":"^1.0.0","duplexify":"^3.3.0","end-of-stream":"^1.1.0","fastparallel":"^1.5.0","hyperlog":"^3.5.0","level":"^0.18.0","memdb":"^0.2.0","minimist":"^1.1.1","ndjson":"^1.3.0","protocol-buffers":"^3.0.0","pump":"^1.0.0","through2":"^0.6.5","xtend":"^4.0.0"},"gitHead":"586a576eee13314c7bdb5823e68bf9952ba276b8","bugs":{"url":"https://github.com/mcollina/hyperemitter/issues"},"homepage":"https://github.com/mcollina/hyperemitter","_id":"hyperemitter@1.1.1","_shasum":"28a9656b917eeef6eea74015e7c846e4fc164265","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.36","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"dist":{"shasum":"28a9656b917eeef6eea74015e7c846e4fc164265","tarball":"https://registry.npmjs.org/hyperemitter/-/hyperemitter-1.1.1.tgz","integrity":"sha512-Vqxn5M/475FAQcRHd5x7eZSLxLJT+VT0L8JkTwMKrpIeeCubhqoZ4ViR1I/12Y68f8FKc64hd0FNUGIt6vDaiQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6+GdOH/DkMPk0mMlElLM0anU6xeltZlwHuy92UcxlTAIhAM2xjytKekZF5b5PaYOvGA5hxByXsI0jXPjgPWLMwAO+"}]}},"1.1.2":{"name":"hyperemitter","version":"1.1.2","description":"Horizontally Scalable EventEmitter powered by a Merkle DAG","main":"hyperemitter.js","scripts":{"test":"tape test/test.js | faucet","lint":"standard"},"bin":{"hypem":"./bin.js"},"pre-commit":["lint","test"],"keywords":["event","store","eventstore","emitter","merkle","dag"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"license":"ISC","repository":{"type":"git","url":"https://github.com/mcollina/hyperemitter.git"},"devDependencies":{"faucet":"0.0.1","minimist":"^1.1.1","pre-commit":"^1.0.6","standard":"^3.7.1","tape":"^4.0.0"},"dependencies":{"cuid":"^1.2.4","deep-equal":"^1.0.0","duplexify":"^3.3.0","end-of-stream":"^1.1.0","fastparallel":"^1.5.0","hyperlog":"^3.5.0","level":"^0.18.0","memdb":"^0.2.0","minimist":"^1.1.1","ndjson":"^1.3.0","protocol-buffers":"^3.0.0","pump":"^1.0.0","through2":"^0.6.5","xtend":"^4.0.0"},"gitHead":"4a310bf03f803f9cb97229045caa52cd45decf21","bugs":{"url":"https://github.com/mcollina/hyperemitter/issues"},"homepage":"https://github.com/mcollina/hyperemitter","_id":"hyperemitter@1.1.2","_shasum":"1966d791860d32115c86fb807cb1f90cdeda47ef","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.10.36","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"dist":{"shasum":"1966d791860d32115c86fb807cb1f90cdeda47ef","tarball":"https://registry.npmjs.org/hyperemitter/-/hyperemitter-1.1.2.tgz","integrity":"sha512-sB3joemFJjXfAjhjbj7jMrvuMMWEqhmYtv52gd7szldKyU/Xz6KN0+sh4OKkd7+JfbIljyS/NtwaHes5VrQZLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCll5CScXXK72X29KU95X2yiE15T+URakdTDZGfY7R6sgIhAP1eZOknBE9gfwQMPYciXO0RY8QRl3ezrYdiAfDFGc28"}]}},"1.2.0":{"name":"hyperemitter","version":"1.2.0","description":"Horizontally Scalable EventEmitter powered by a Merkle DAG","main":"hyperemitter.js","scripts":{"test":"tape test/test.js | faucet","lint":"standard"},"bin":{"hypem":"./bin.js"},"pre-commit":["lint","test"],"keywords":["event","store","eventstore","emitter","merkle","dag"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"contributors":[{"name":"Dean McDonnell","email":"mcdonnelldean@outlook.com"}],"license":"ISC","repository":{"type":"git","url":"git+https://github.com/mcollina/hyperemitter.git"},"devDependencies":{"faucet":"0.0.1","minimist":"^1.1.1","pre-commit":"^1.0.6","standard":"^3.7.1","tape":"^4.0.0"},"dependencies":{"bulk-write-stream":"^1.0.0","cuid":"^1.2.4","deep-equal":"^1.0.0","duplexify":"^3.3.0","end-of-stream":"^1.1.0","fastparallel":"^1.5.0","hyperlog":"^3.5.0","level":"^0.18.0","memdb":"^0.2.0","minimist":"^1.1.1","ndjson":"^1.3.0","protocol-buffers":"^3.0.0","pump":"^1.0.0","through2":"^0.6.5","xtend":"^4.0.0"},"gitHead":"a1de03b92b71bde23065011bc4d330b68bfe21b1","bugs":{"url":"https://github.com/mcollina/hyperemitter/issues"},"homepage":"https://github.com/mcollina/hyperemitter#readme","_id":"hyperemitter@1.2.0","_shasum":"a2d723dea6e2dd871fbf14b94fe7e4acccdf3cf1","_from":".","_npmVersion":"2.11.1","_nodeVersion":"0.10.36","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"dist":{"shasum":"a2d723dea6e2dd871fbf14b94fe7e4acccdf3cf1","tarball":"https://registry.npmjs.org/hyperemitter/-/hyperemitter-1.2.0.tgz","integrity":"sha512-fV9/pevelw3Mn19pj5qspH5fyIyFZHHZ8kDngpmwF79YvTGeVfsS65zNN2YzGnKVtGSilrUk3cUnwDZEeeKx6A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFFyzNMR9x3JtF+K0c17SBP+OTPH3vFZ1LzhjaJZpAM3AiEAlgUeF4B8AWURpQ3XZBIQEA2SI55J3wlZdcz5S23ahpE="}]}},"1.3.0":{"name":"hyperemitter","version":"1.3.0","description":"Horizontally Scalable EventEmitter powered by a Merkle DAG","main":"hyperemitter.js","scripts":{"test":"tape test/test.js | faucet","lint":"standard"},"bin":{"hypem":"./bin.js"},"pre-commit":["lint","test"],"keywords":["event","store","eventstore","emitter","merkle","dag"],"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"contributors":[{"name":"Dean McDonnell","email":"mcdonnelldean@outlook.com"}],"license":"ISC","repository":{"type":"git","url":"git+https://github.com/mcollina/hyperemitter.git"},"devDependencies":{"faucet":"0.0.1","pre-commit":"^1.0.6","standard":"^5.1.0","tape":"^4.2.0"},"dependencies":{"bulk-write-stream":"^1.0.0","cuid":"^1.2.4","deep-equal":"^1.0.0","duplexify":"^3.3.0","end-of-stream":"^1.1.0","fastparallel":"^1.5.0","hyperlog":"^4.5.0","level":"^1.3.0","memdb":"^1.0.1","minimist":"^1.1.1","ndjson":"^1.3.0","protocol-buffers":"^3.0.0","pump":"^1.0.0","through2":"^2.0.0","xtend":"^4.0.0"},"gitHead":"2144ab77d16bc5cab04492f32fff860c2ea60385","bugs":{"url":"https://github.com/mcollina/hyperemitter/issues"},"homepage":"https://github.com/mcollina/hyperemitter#readme","_id":"hyperemitter@1.3.0","_shasum":"cb877e079e4b51692744b5813866f5aae89956a7","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.12.3","_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"dist":{"shasum":"cb877e079e4b51692744b5813866f5aae89956a7","tarball":"https://registry.npmjs.org/hyperemitter/-/hyperemitter-1.3.0.tgz","integrity":"sha512-FkUjzgVEBq4kd2Q0OypY3r8jcBDEZXsokpbbHajPmVWWS2BIhy4hGWs6uwj4b509eumiXHjZ0ZkveN31xKZmcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDurYGYh47zNbeXjMBLnqm3Rj3GZn/WqZOVk2IN8cnM0wIgIubjlqFvoxtMZNjDOtl96Wxf6EFLDR+TwO2fxhCakyw="}]},"maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}]}},"readme":"# HyperEmitter &nbsp;&nbsp;[![Build Status](https://travis-ci.org/mcollina/hyperemitter.png)](https://travis-ci.org/mcollina/hyperemitter)\r\n\r\nHyperEmitter is a horizontally scalable __and__ persistent EventEmitter powered by a [Merkle DAG](http://npm.im/hyperlog).\r\n(Yes, it's like a blockchain). In other contexts, this concept is also called an EventStore. HyperEmitter\r\nuses [protocol-buffers](https://developers.google.com/protocol-buffers/), specifically\r\n[mafintosh's](https://github.com/mafintosh/protocol-buffers) implementation, for handling message schemas, although custom codecs are also supported.\r\n\r\n> This module is __highly experimental__, __possibly under-perfoming__, and __may have bugs__, use with\r\n> caution. On the other end, if the thought of a persistent, horizontally scaleable EventStore gets you\r\n> excite please jump in wherever you feel you can help!\r\n\r\n## Installation\r\nTo install the module for use locally in your project use:\r\n\r\n```\r\nnpm install hyperemitter --save\r\n```\r\n\r\nTo install the companion CLI tool, you will need to install globally:\r\n\r\n```\r\nnpm install hyperemitter -g\r\n```\r\n\r\n## Example\r\nThe example below can be found and ran from the [examples](./examples/) folder; it demonstrates\r\nhow to connect two HyperEmitters together and how they both receive all messages sent.\r\n\r\n```javascript\r\n'use strict'\r\n\r\nvar fs = require('fs')\r\nvar path = require('path')\r\n\r\n// The emitter itself as well as an in memory\r\n// leveldb based store, any leveldb store will do.\r\nvar HyperEmitter = require('../hyperemitter')\r\nvar buildDB = require('memdb')\r\n\r\n// use the example-schema.proto as the message schema.\r\nvar schema = fs.readFileSync(path.join('.', 'example-schema.proto'))\r\n\r\n// two emitters will be used for this example, notice each\r\n// maintains it's own leveldb store and share the same schema.\r\nvar emitterOne = new HyperEmitter(buildDB('a'), schema)\r\nvar emitterTwo = new HyperEmitter(buildDB('b'), schema)\r\n\r\n// listen on port 9001, ensure no connection error.\r\nemitterOne.listen(9901, function (err) {\r\n  if (err) { return }\r\n\r\n  // connect to the first emitter.\r\n  emitterTwo.connect(9901, '127.0.0.1', function (err) {\r\n    if (err) { return }\r\n  })\r\n\r\n  // basic message type\r\n  var userAddedMsg = {\r\n    id: 1,\r\n    username: 'user'\r\n  }\r\n\r\n  // basic message type\r\n  var userRemovedMsg = {\r\n    id: 1\r\n  }\r\n\r\n  // Messages sent on either emitter will be handled.\r\n  emitterOne.on('userRemoved', function (msg) {\r\n    console.log('userRemoved: ', msg)\r\n  })\r\n\r\n  // Messages sent on either emitter will be handled.\r\n  emitterTwo.on('userAdded', function (msg) {\r\n    console.log('userAdded: ', msg)\r\n  })\r\n\r\n  // We send each message across the opposite emitter.\r\n  emitterOne.emit('userAdded', userAddedMsg)\r\n  emitterTwo.emit('userRemoved', userRemovedMsg)\r\n\r\n  function complete () {\r\n    emitterOne.close()\r\n    emitterTwo.close()\r\n  }\r\n\r\n  // we will wait for 500ms to see if more than one\r\n  // message is delivered to the subscribers above.\r\n  setTimeout(complete, 500)\r\n})\r\n```\r\n\r\n## Using The CLI Tool\r\nHyperEmitter comes with a nice CLI to work with other remote HyperEmitter's. Also, it doubles\r\nas really useful tool for debugging. The sample below uses the schema in `test/fixture/`.\r\n\r\n```\r\nhypem --db db --port 1234 fixture/messages.proto\r\n```\r\n\r\nOn pressing enter, you should see output similar to the following:\r\n\r\n```\r\nlistening on 1234 127.0.0.1\r\nEventPeer  { id: '123', addresses: [ { ip: 'localhost', port: 1234 } ] }\r\n```\r\n\r\nFrom here you can then use the provided REPL to work with HyperEmitter:\r\n\r\n```javascript\r\nhyper.emit('Hello', { from: 'Matteo' })\r\n```\r\n\r\nAnd receive the following response:\r\n\r\n```\r\nHello { from: 'Matteo', message: '' }\r\n```\r\n\r\nTo connect another hyperEmitter in another shell:\r\n\r\n```\r\nhypem --db db2 --target-port 1234 fixture/messages.proto\r\n```\r\n\r\nWhich will output the following:\r\n\r\n```\r\nconnected to localhost 1234\r\nEventPeer { id: '123', addresses: [ { ip: 'localhost', port: 1234 } ] }\r\nHello { from: 'Matteo', message: '' }\r\n```\r\n\r\nAs you can see the events are synced up!\r\n\r\nTo export the data in [newline delimited json](http://ndjson.org/), use:\r\n\r\n```\r\nhypem --no-repl --db db4 --target-port 1234 fixture/messages.proto\r\n```\r\n\r\nWhich will produce output like so:\r\n\r\n```\r\n{\"name\":\"EventPeer\",\"payload\":{\"id\":\"123\",\"addresses\":[{\"ip\":\"localhost\",\"port\":1234}]}}\r\n{\"name\":\"Hello\",\"payload\":{\"from\":\"Matteo\",\"message\":\"\"}}\r\n```\r\n\r\nThe cli tool also works as a input stream, following the UNIX philosophy. If you close a REPL or a ndjson stream,\r\nthe next time it will start where it stopped. If you have a stream, you can start back from the beginning using\r\nthe `--from-scratch` flag.\r\n\r\n## API Reference\r\nThis page contains a list of public API's exposed by the HyperEmitter module as well as a brief\r\ndescription of their use. For additional samples please checkout out our [examples](./examples/)\r\nfolder.\r\n\r\n  * <a href=\"#hyperemitter\">HyperEmitter</a>\r\n  * <a href=\"#messages\">.messages</a>\r\n  * <a href=\"#registerCodec\">.registerCodec()</a>\r\n  * <a href=\"#emit\">.emit()</a>\r\n  * <a href=\"#on\">.on()</a>\r\n  * <a href=\"#removeListener\">.removeListener()</a>\r\n  * <a href=\"#connect\">.connect()</a>\r\n  * <a href=\"#listen\">.listen()</a>\r\n  * <a href=\"#stream\">.stream()</a>\r\n  * <a href=\"#close\">.close()</a>\r\n\r\n<a name=\"hyperemitter\"></a>\r\n### HyperEmitter(db, schema, [opts])\r\nHyperEmitter is both the name of the module and of the function to be required. The function is actually\r\na class or a class factory depending on how it is used. The code below shows both valid ways to get a\r\nnew instance of HyperEmitter for use:\r\n\r\n```\r\nvar emitterOne = Hyperemitter(someDb, someSchema)\r\nvar emitterTwo = new HyperEmitter(someDb, someSchema)\r\n```\r\n\r\n * ##### _db_\r\n The `db` argument accepts a [levelup](http://npm.im/levelup) instance, which in turn is powered by\r\n [leveldb](). We recommend [level](http://npm.im/level) for persistent storage and\r\n [memdb](http://npm.im/memdb) if you require an in memory store.\r\n\r\n * ##### _schema_\r\n An string or stream that represents all of the messages to support in a given instance of HyperEmitter.\r\n\r\n * ##### _opts_\r\n An optional object that can be provided to configure the created instance. All available\r\n options are listed below.\r\n\r\n  * ___reconnectTimeout:___ The timeout that this instance will wait before reconnecting to peers.\r\n\r\n---\r\n\r\n### .messages <a name=\"messages\"></a>\r\nMessage types are stored in the `.messages` field for each instance created. This field is populated\r\nwith a normalized object based on the schema provided. Each property represents a single message, indvidual\r\nmessages, as well as their encoder and decoder can be accessed from here.\r\n\r\n``` js\r\nvar emitter = HyperEmitter(someDb, someSchema)\r\n\r\n// the object containing each message as a property\r\nvar messages = emitter.messages\r\n\r\n// access an individual message by it's name\r\nvar message = messages[messageName]\r\n\r\n// access a given message's encode / decode functions\r\nvar encoder = message.encode\r\nvar decode = message.decode\r\n```\r\n\r\n---\r\n\r\n### .emit(event, message, [callback]) <a name=\"emit\"></a>\r\nMessages can be emitted from HyperEmitter using the `.emit()` method. This method takes the name of the\r\nevent to be emitted and validates `message` against the schema before sending it off to any listening\r\nsubscribers, in parallel. Once complete the `callback` function is called, if present.\r\n\r\n * ##### _event_\r\n The name of one of the message definitions from the provided schema.\r\n\r\n * ##### _message_\r\n Any object who's shape matches the named event. It's keys are validated against the schema.\r\n\r\n * ##### _callback_\r\n An optional function that will be called once the emitted message has been added to the log.\r\n\r\n---\r\n\r\n### .registerCodec(name, codec | codecs) <a name=\"registerCodec\"></a>\r\nCustom codecs can be registered as long as they have both an `encode` and `decode` method. Codecs\r\nare keyed by message name. For ease of use registration params can be provided as args (name,\r\ncodec), an object, or an array of `{name: '', codec: obj}`. Only once codec can be registered against one message at any given time.\r\n\r\n * ##### _name_\r\n The name of the message message this codec handles.\r\n\r\n * ##### _codec_\r\n Any object which has an `encode` and `decode` method.\r\n\r\n * ##### _codecs_\r\n An object or array which represents a collection of codecs and their names.\r\n\r\n---\r\n\r\n<a name=\"on\"></a>\r\n### .on(event, callback(message[, done]))\r\nSubscribes to and provides a function to be called each time and event is raised.\r\n\r\n * ##### _event_\r\n The name of the event being subscribed to.\r\n\r\n * ##### _callback_\r\n The function to be called when a new event is raised. The `message` arg holds the message emitted. The\r\n `done` arg can be used for letting the emitter know when the function has completed the handling of\r\n the event.\r\n\r\n---\r\n\r\n<a name=\"removeListener\"></a>\r\n### .removeListener(event, callback(message[, done]))\r\nRemoves the listener who matches the one provided. This method does not work with anonymous functions, only a\r\nfunction with a prior reference can be removed.\r\n\r\n * ##### _event_\r\n The name of the event the listener is subscribed to.\r\n\r\n * ##### _callback_\r\n The reference of the function originally used in the `.on` call.\r\n\r\n---\r\n\r\n<a name=\"connect\"></a>\r\n### .connect(port, host[, done])\r\nConnects this HyperEmitter with another one which we call a peer. Peers can exist on other machines, HyperEmitter\r\nwill communicate over TCP using the `host` and `port` provided. An optional function can be provided that will be\r\ncalled once the connection has been made.\r\n\r\n * ##### _port_\r\n The port of the machine the peer to connect to resides on\r\n\r\n * ##### _host_\r\n The host of the machine the peer to connect to resides on.\r\n\r\n * ##### _done_\r\n A function to be called when connected.\r\n\r\n---\r\n\r\n<a name=\"listen\"></a>\r\n### .listen(port[, host[, done]])\r\nListen on a given port/host combination. An `EventPeer` event will be\r\nemitter.\r\n\r\n * ##### _port_\r\n The port to listen on.\r\n\r\n * ##### _host_\r\n The host to listen on.\r\n\r\n * ##### _done_\r\n An optional function to be called one listening has begun.\r\n\r\n---\r\n\r\n<a name=\"stream\"></a>\r\n### .stream([opts])\r\nA Duplex stream to emit and receive events.\r\n\r\n * ##### _opts_\r\n An optional object of settings.\r\n\r\n  * `from:` The point in the stream to return events since. supports 'beginning'\r\n\r\n---\r\n\r\n<a name=\"close\"></a>\r\n### .close(callback)\r\nClose a given HyperEmitter. After, all `emit` will return an error.\r\n\r\n * ##### _callback_\r\n\r\n An optional function to be called when close has completed.\r\n\r\n\r\n---\r\n\r\n## Contributing\r\nHyperEmitter is a mad science project and like all mad science project it requires mad scientists, the more\r\nthe merrier! If you feel you can help in any way, be it with examples, extra testing, or new features please\r\nbe our guest. See our [Contribution Guide]() for information on obtaining the source and an overview of the\r\ntooling used.\r\n\r\n[![js*standard-style](https://raw.githubusercontent.com/feross/standard/master/badge.png)](https://github.com/feross/standard)\r\n\r\n## License\r\n\r\nCopyright Matteo Collina 2015, Licensed under [ISC](./LICENSE)\r\n","maintainers":[{"name":"matteo.collina","email":"hello@matteocollina.com"}],"time":{"modified":"2022-06-18T23:33:09.878Z","created":"2015-05-01T18:06:00.717Z","0.0.1":"2015-05-01T18:06:00.717Z","1.0.0":"2015-05-01T18:18:31.529Z","1.0.1":"2015-05-01T18:25:29.159Z","1.0.2":"2015-05-01T20:52:36.227Z","1.0.3":"2015-05-03T06:45:27.416Z","1.1.0":"2015-05-04T17:48:42.188Z","1.1.1":"2015-05-06T07:05:59.442Z","1.1.2":"2015-05-10T08:45:22.487Z","1.2.0":"2015-06-14T16:12:49.634Z","1.3.0":"2015-08-19T10:44:17.275Z"},"homepage":"https://github.com/mcollina/hyperemitter#readme","keywords":["event","store","eventstore","emitter","merkle","dag"],"repository":{"type":"git","url":"git+https://github.com/mcollina/hyperemitter.git"},"author":{"name":"Matteo Collina","email":"hello@matteocollina.com"},"bugs":{"url":"https://github.com/mcollina/hyperemitter/issues"},"license":"ISC","readmeFilename":"README.md","users":{"matteo.collina":true,"goliatone":true},"contributors":[{"name":"Dean McDonnell","email":"mcdonnelldean@outlook.com"}]}