{"_id":"microee","_rev":"164298","name":"microee","description":"A tiny EventEmitter-like client and server side library","dist-tags":{"latest":"0.0.6"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"time":{"modified":"2021-06-03T11:43:47.000Z","created":"2012-10-05T03:24:25.459Z","0.0.6":"2014-02-27T22:15:25.103Z","0.0.5":"2014-01-29T01:55:09.286Z","0.0.3":"2014-01-06T21:11:37.563Z","0.0.2":"2012-10-05T22:04:25.299Z","0.0.1":"2012-10-05T03:24:25.459Z"},"users":{},"author":{"name":"Mikito Takada","email":"mixu@mixu.net","url":"http://mixu.net/"},"repository":{"type":"git","url":"git://github.com/mixu/microee"},"versions":{"0.0.6":{"name":"microee","description":"A tiny EventEmitter-like client and server side library","license":"BSD","version":"0.0.6","author":{"name":"Mikito Takada","email":"mixu@mixu.net","url":"http://mixu.net/"},"keywords":["event","events","eventemitter","emitter"],"repository":{"type":"git","url":"git://github.com/mixu/microee"},"main":"index.js","scripts":{"test":"./node_modules/.bin/mocha --ui exports --reporter spec --bail ./test/microee.test.js"},"devDependencies":{"mocha":"*","uglify-js":"~2.4.12"},"bugs":{"url":"https://github.com/mixu/microee/issues"},"_id":"microee@0.0.6","dist":{"shasum":"a12bdb0103681e8b126a9b071eba4c467c78fffe","size":2803,"noattachment":false,"key":"/microee/-/microee-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/microee/download/microee-0.0.6.tgz"},"_from":".","_npmVersion":"1.2.31","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"directories":{},"publish_time":1393539325103,"_cnpm_publish_time":1393539325103,"_hasShrinkwrap":false},"0.0.5":{"name":"microee","description":"A tiny EventEmitter-like client and server side library","license":"BSD","version":"0.0.5","author":{"name":"Mikito Takada","email":"mixu@mixu.net","url":"http://mixu.net/"},"keywords":["event","events","eventemitter","emitter"],"repository":{"type":"git","url":"git://github.com/mixu/microee"},"main":"index.js","scripts":{"test":"mocha --ui exports --reporter spec --bail ./test/microee.test.js"},"devDependencies":{"mocha":"*","uglify-js":"~2.4.12"},"bugs":{"url":"https://github.com/mixu/microee/issues"},"homepage":"https://github.com/mixu/microee","_id":"microee@0.0.5","dist":{"shasum":"972cca0be26033cd43472235325d5cb9610a8d57","size":2454,"noattachment":false,"key":"/microee/-/microee-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/microee/download/microee-0.0.5.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"directories":{},"publish_time":1390960509286,"_cnpm_publish_time":1390960509286,"_hasShrinkwrap":false},"0.0.3":{"name":"microee","description":"A tiny EventEmitter-like client and server side library","license":"BSD","version":"0.0.3","author":{"name":"Mikito Takada","email":"mixu@mixu.net","url":"http://mixu.net/"},"keywords":["event","events","eventemitter","emitter"],"repository":{"type":"git","url":"git://github.com/mixu/microee"},"main":"index.js","scripts":{"test":"./node_modules/.bin/mocha --ui exports --reporter spec --bail ./test/microee.test.js"},"devDependencies":{"mocha":"*"},"readmeFilename":"readme.md","bugs":{"url":"https://github.com/mixu/microee/issues"},"_id":"microee@0.0.3","dist":{"shasum":"2945a6373c90b7e3d4632cb3aa96e5b0f53360b8","size":2028,"noattachment":false,"key":"/microee/-/microee-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/microee/download/microee-0.0.3.tgz"},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"directories":{},"publish_time":1389042697563,"_cnpm_publish_time":1389042697563,"_hasShrinkwrap":false},"0.0.2":{"name":"microee","description":"A tiny EventEmitter-like client and server side library","version":"0.0.2","author":{"name":"Mikito Takada","email":"mixu@mixu.net","url":"http://mixu.net/"},"keywords":["event","events","eventemitter","emitter"],"repository":{"type":"git","url":"git://github.com/mixu/microee"},"main":"index.js","scripts":{"test":"./node_modules/.bin/mocha --ui exports --reporter spec --bail ./test/microee.test.js"},"devDependencies":{"mocha":"*"},"_id":"microee@0.0.2","dist":{"shasum":"72e80d477075e5e799470f5defea96d1dd121587","size":1933,"noattachment":false,"key":"/microee/-/microee-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/microee/download/microee-0.0.2.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"directories":{},"publish_time":1349474665299,"_cnpm_publish_time":1349474665299,"_hasShrinkwrap":false},"0.0.1":{"name":"microee","description":"A tiny EventEmitter-like client and server side library","version":"0.0.1","author":{"name":"Mikito Takada","email":"mixu@mixu.net","url":"http://mixu.net/"},"keywords":["event","events","eventemitter","emitter"],"repository":{"type":"git","url":"git://github.com/mixu/microee"},"main":"index.js","scripts":{"test":"./node_modules/.bin/mocha --ui exports --reporter spec --bail ./test/microee.test.js"},"devDependencies":{"mocha":"*"},"_id":"microee@0.0.1","dist":{"shasum":"031277d0278165ce9b63deb633677772d9a05141","size":1821,"noattachment":false,"key":"/microee/-/microee-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/microee/download/microee-0.0.1.tgz"},"_npmVersion":"1.1.59","_npmUser":{"name":"mixu","email":"mixu@mixu.net"},"maintainers":[{"name":"mixu","email":"mixu@mixu.net"}],"directories":{},"publish_time":1349407465459,"_cnpm_publish_time":1349407465459,"_hasShrinkwrap":false}},"readme":"# microEE\n\nA client and server side library for routing events.\n\n[![Build Status](https://secure.travis-ci.org/mixu/microee.png?branch=master)](https://travis-ci.org/mixu/microee)\n\nI was disgusted by the size of [MiniEE](https://github.com/mixu/miniee) (122 sloc, 4.4kb), so I decided a rewrite was in order.\n\nMicroEE is a more satisfying (~50 sloc, ~1200 characters), and passes the same tests as MiniEE (excluding the RegExp support, but including many real-world tests, such as removing a once() callback, and checking for the correct order of once callback removal).\n\n# Installing:\n\n    npm install microee\n\n# In-browser version\n\nUse the version in `./dist/`. It exports a single global, `microee`.\n\nTo run the in-browser tests, open `./test/index.html` in the browser after cloning this repo and doing npm install (to get Mocha).\n\n# Usage example: `microee.mixin`\n\n    var MicroEE = require('microee');\n    function MyClass() {\n      // ...\n    }\n    MicroEE.mixin(MyClass);\n    MyClass.prototype.foo = function() {\n      // ...\n    };\n\n    var obj = new MyClass();\n    // set string callback\n    obj.on('event', function(arg1, arg2) { console.log(arg1, arg2); });\n    obj.emit('event', 'aaa', 'bbb'); // trigger callback\n\n# API\n\nThe API is based on [Node's EventEmitter](http://nodejs.org/api/events.html).\n\nThere are two additional niceties: `emitter.when(event, listener)` and `.mixin()`.\n\nSupport for `emitter.listeners(event)` was added in `v0.0.6`.\n\n## emitter.on(event, listener)\n\nAdds a listener to the end of the listeners array for the specified event.\n\n```\nserver.on('connection', function (stream) {\n  console.log('someone connected!');\n});\n```\n\nReturns emitter, so calls can be chained.\n\n## emitter.once(event, listener)\n\nAdds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.\n\nReturns emitter, so calls can be chained.\n\n## emitter.when(event, listener)\n\nAddition to the regular API. If `listener` returns true, the listener is removed. Useful for waiting for a particular set of parameters on a recurring event e.g. in tests.\n\nReturns emitter, so calls can be chained.\n\n## microee.mixin(object)\n\nAddition to the regular API. Extends `object.prototype` with all the microee methods, allowing other classes to act like event emitters.\n\n## emitter.emit(event, [arg1], [arg2], [...])\n\nExecute all listeners on `event`, with the supplied arguments.\n\nReturns emitter, so calls can be chained.\n\n## emitter.removeListener(event, listener)\n\nRemove a listener from the listener array for the specified event.\n\n## emitter.removeAllListeners([event])\n\nRemoves all listeners, or those of the specified event.\n\n## emitter.listeners(event)\n\nReturns an array of listeners for the specified event.\n","_attachments":{},"bugs":{"url":"https://github.com/mixu/microee/issues"},"license":"BSD"}