{"_id":"bane","_rev":"941498","name":"bane","description":"(Yet another) Event emitter for Node, Browser globals and AMD","dist-tags":{"latest":"1.1.2"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"time":{"modified":"2021-09-23T02:07:50.000Z","created":"2012-07-19T23:20:43.699Z","1.1.2":"2015-11-14T13:09:13.257Z","1.1.0":"2013-11-23T15:37:19.670Z","1.0.0":"2013-09-16T22:27:57.549Z","0.4.0":"2012-12-04T07:59:09.207Z","0.3.0":"2012-11-27T11:29:16.618Z","0.2.0":"2012-11-26T22:23:13.374Z","0.1.0":"2012-07-19T23:20:43.699Z"},"users":{},"author":{"name":"August Lilleaas and Christian Johansen"},"repository":{"type":"git","url":"git+https://github.com/busterjs/bane.git"},"versions":{"1.1.2":{"name":"bane","version":"1.1.2","description":"(Yet another) Event emitter for Node, Browser globals and AMD","homepage":"http://busterjs.org/docs/bane/","author":{"name":"August Lilleaas and Christian Johansen"},"contributors":[{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Stein Magnus Jodal","email":"stein.magnus@jodal.no","url":"http://jodal.no"}],"license":"BSD-2-Clause","main":"./lib/bane","repository":{"type":"git","url":"git+https://github.com/busterjs/bane.git"},"scripts":{"test":"node node_modules/buster/bin/buster-test","test-debug":"node --debug-brk node_modules/buster/bin/buster-test"},"devDependencies":{"buster":"0.7.x"},"gitHead":"8f53aa305d49cdd7b1ec7987542b3ece79829b49","bugs":{"url":"https://github.com/busterjs/bane/issues"},"_id":"bane@1.1.2","_shasum":"bc64248cc823160c7df3f238b87fe62c44e107b9","_from":".","_npmVersion":"3.3.12","_nodeVersion":"4.2.2","_npmUser":{"name":"dominykas","email":"hello@dominykas.com"},"dist":{"shasum":"bc64248cc823160c7df3f238b87fe62c44e107b9","size":5977,"noattachment":false,"key":"/bane/-/bane-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/bane/download/bane-1.1.2.tgz"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1447506553257,"_cnpm_publish_time":1447506553257,"_hasShrinkwrap":false,"deprecated":"No longer maintained - use the built-in EventEmitter in Node.js"},"1.1.0":{"name":"bane","version":"1.1.0","description":"(Yet another) Event emitter for Node, Browser globals and AMD","homepage":"http://busterjs.org/docs/bane/","author":{"name":"August Lilleaas and Christian Johansen"},"contributors":[{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Stein Magnus Jodal","email":"stein.magnus@jodal.no","url":"http://jodal.no"}],"main":"./lib/bane","repository":{"type":"git","url":"https://github.com/busterjs/bane.git"},"scripts":{"test":"node ./test/bane-test.js"},"devDependencies":{"buster":"0.6.11"},"readmeFilename":"Readme.rst","bugs":{"url":"https://github.com/busterjs/bane/issues"},"_id":"bane@1.1.0","dist":{"shasum":"5c93a920d76b7d9197b315056a0916e0f3aa9786","size":6062,"noattachment":false,"key":"/bane/-/bane-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bane/download/bane-1.1.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"cjohansen","email":"christian@cjohansen.no"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1385221039670,"_hasShrinkwrap":false,"deprecated":"No longer maintained - use the built-in EventEmitter in Node.js","_cnpm_publish_time":1385221039670},"1.0.0":{"name":"bane","version":"1.0.0","description":"(Yet another) Event emitter for Node, Browser globals and AMD","homepage":"http://busterjs.org/docs/bane/","author":{"name":"August Lilleaas and Christian Johansen"},"contributors":[{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Stein Magnus Jodal","email":"stein.magnus@jodal.no","url":"http://jodal.no"}],"main":"./lib/bane","repository":{"type":"git","url":"https://github.com/busterjs/bane.git"},"scripts":{"test":"node ./test/bane-test.js"},"devDependencies":{"buster":"0.6.11"},"_id":"bane@1.0.0","dist":{"shasum":"949fe8912b42b38f352e1fad204d825dafa1ff40","size":5900,"noattachment":false,"key":"/bane/-/bane-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bane/download/bane-1.0.0.tgz"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1379370477549,"_hasShrinkwrap":false,"deprecated":"No longer maintained - use the built-in EventEmitter in Node.js","_cnpm_publish_time":1379370477549},"0.4.0":{"name":"bane","version":"0.4.0","description":"(Yet another) Event emitter for Node, Browser globals and AMD","homepage":"http://busterjs.org/docs/bane/","author":{"name":"August Lilleaas and Christian Johansen"},"contributors":[{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Stein Magnus Jodal","email":"stein.magnus@jodal.no","url":"http://jodal.no"}],"main":"./lib/bane","repository":{"type":"git","url":"https://github.com/busterjs/bane.git"},"scripts":{"test":"node ./test/bane-test.js"},"devDependencies":{"buster":"0.6.2"},"readmeFilename":"Readme.rst","_id":"bane@0.4.0","dist":{"shasum":"648d24c09f88f495ffb523ad84717e602b704bd3","size":6013,"noattachment":false,"key":"/bane/-/bane-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bane/download/bane-0.4.0.tgz"},"_npmVersion":"1.1.65","_npmUser":{"name":"cjohansen","email":"christian@cjohansen.no"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1354607949207,"_hasShrinkwrap":false,"deprecated":"No longer maintained - use the built-in EventEmitter in Node.js","_cnpm_publish_time":1354607949207},"0.3.0":{"name":"bane","version":"0.3.0","description":"(Yet another) Event emitter for Node, Browser globals and AMD","homepage":"http://busterjs.org/docs/bane/","author":{"name":"August Lilleaas and Christian Johansen"},"contributors":[{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"},{"name":"Stein Magnus Jodal","email":"stein.magnus@jodal.no","url":"http://jodal.no"}],"main":"./lib/bane","repository":{"type":"git","url":"https://github.com/busterjs/bane.git"},"scripts":{"test":"node ./test/bane-test.js"},"devDependencies":{"buster":"0.6.2"},"readmeFilename":"Readme.rst","_id":"bane@0.3.0","dist":{"shasum":"43fa51f450f08c3a79a44ec7a281e578cc35e30b","size":5712,"noattachment":false,"key":"/bane/-/bane-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bane/download/bane-0.3.0.tgz"},"_npmVersion":"1.1.65","_npmUser":{"name":"cjohansen","email":"christian@cjohansen.no"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1354015756618,"_hasShrinkwrap":false,"deprecated":"No longer maintained - use the built-in EventEmitter in Node.js","_cnpm_publish_time":1354015756618},"0.2.0":{"name":"bane","version":"0.2.0","description":"(Yet another) Event emitter for Node, Browser globals and AMD","homepage":"http://busterjs.org/docs/bane/","author":{"name":"August Lilleaas and Christian Johansen"},"contributors":[{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},{"name":"August Lilleaas","email":"august.lilleaas@gmail.com","url":"http://augustl.com"}],"main":"./lib/bane","repository":{"type":"git","url":"https://github.com/busterjs/bane.git"},"scripts":{"test":"node ./test/bane-test.js"},"devDependencies":{"buster":"0.6.2"},"readmeFilename":"Readme.rst","_id":"bane@0.2.0","dist":{"shasum":"d57ef235374e8df0797e14f5de21d62d5af86e5c","size":5537,"noattachment":false,"key":"/bane/-/bane-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bane/download/bane-0.2.0.tgz"},"_npmVersion":"1.1.65","_npmUser":{"name":"cjohansen","email":"christian@cjohansen.no"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1353968593374,"_hasShrinkwrap":false,"deprecated":"No longer maintained - use the built-in EventEmitter in Node.js","_cnpm_publish_time":1353968593374},"0.1.0":{"name":"bane","version":"0.1.0","description":"(Yet another) Event emitter for Node, Browser globals and AMD","homepage":"http://busterjs.org/docs/bane/","author":{"name":"Christian Johansen","email":"christian@cjohansen.no","url":"http://cjohansen.no"},"contributors":[{"name":"Christian Johansen","url":"christian@cjohansen.no"},{"name":"August Lilleaas","url":"august@augustl.com"}],"main":"./lib/bane","repository":{"type":"git","url":"git://github.com/busterjs/bane.git"},"scripts":{"test":"./node_modules/buster/bin/buster-test --node"},"devDependencies":{"buster":"0.6.2"},"_npmUser":{"name":"cjohansen","email":"christian@cjohansen.no"},"_id":"bane@0.1.0","dependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-alpha-6","_nodeVersion":"v0.6.5","_defaultsLoaded":true,"dist":{"shasum":"d7d907ca464f6deaf9a76c0205bf179f8f8dd8db","size":5565,"noattachment":false,"key":"/bane/-/bane-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bane/download/bane-0.1.0.tgz"},"maintainers":[{"name":"augustl","email":"august@augustl.com"},{"name":"dominykas","email":"hello@dominykas.com"},{"name":"dwittner","email":"d.wittner@gmx.de"}],"directories":{},"publish_time":1342740043699,"_hasShrinkwrap":false,"deprecated":"No longer maintained - use the built-in EventEmitter in Node.js","_cnpm_publish_time":1342740043699}},"readme":"# BANE\n\n[![Build status](https://secure.travis-ci.org/busterjs/bane.png?branch=master)](http://travis-ci.org/busterjs/bane)\n\n> Browser globals, AMD and Node Events\n\n`bane` is a small event emitter library that works in browsers (including old\nand rowdy ones, like IE6) and Node. It will define itself as an AMD module if\nyou want it to (i.e. if there's a `define` function available).\n\n`bane` is not entirely API compatible with Node's event emitter, but it does\nprovide the iconic `on` and `emit` functions.\n\n## Developers - Running tests\n\n```\nnpm install\n./node_modules/buster/bin/buster-test --node\n./node_modules/buster/bin/buster-server\n./node_modules/buster/bin/buster-test --browser\n```\n\n## Emitter creation API\n\n### `var emitter = bane.createEventEmitter([object]);`\n\n\nCreate a new event emitter. If an object is passed, it will be modified by\nadding the event emitter methods (see below).\n\n## Emitter API\n\n\n### `on(event, listener)`\n\nRegister the `listener` function to be called when the emitter emits the\n`event` (which is a string).\n\n### `on(listener)`\n\nRegister the `listener` function as a \"supervisor\". It will be called for\nany event emitted from the emitter.\n\n### `off(event, listener)`\n\nRemove a previously registered `listener` function for the specified `event`\n(which is a string). If the function has not previously been registered, it is\nsilently ignored.\n\n### `off(listener)`\n\nRemove a previously registered \"supervisor\" `listener` function. If the\nfunction has not previously been registered, it is silently ignored.\n\n###`off(event)`\n\nRemove all previously registered `listener` functions for the specified\n`event` (which is a string). If no functions have previously been registered,\nit is silently ignored.\n\n###`off()`\n\nRemove all previously registered listeners on the object, both regular\nlisteners, supervisor listeners, and errbacks. If no functions have previously\nbeen registrered, it is silently ignored.\n\n###`once(event, listener)`\n\nRegister a `listener` function for the given `event` (which is a string)\nonly once. After the first event has been emitted, the listener is removed.\n\n###`bind(object)`\n\nRegister all methods on `object` as listeners for the event named as the\nmethod name. Convenient way to bind many event listeners in one go:\n\n```javascript\nvar listener = {\n    start: function () {\n        console.log(\"Started!\");\n    },\n\n    end: function () {\n        console.log(\"Ended\");\n    }\n};\n\nemitter.bind(listener);\n```\n\nThe above example will bind `listener.start` to the `\"start\"` event and vice\nversa with `end`. Note that property names can be quoted to bind to any kind of\nevent name (e.g. `\"test:start\"`).\n\n### `bind(object, events)`\n\nBinds methods on `object` to corresponding events (see `bind(object)`\nabove), but instead of binding all methods on the object, only binds the\nevents listed in the provided `events` array.\n\n###`errback(listener)`\n\nRegister the `listener` function as an \"errback\". It will be called with the\narguments `event` and `error` for any error thrown when listeners are\nnotified.\n\n### `emit(event[, data1[, data2[, ...]]])`\n\nEmit the `event` (which is a string) with optional data. Will cause all\nregistered listeners for the named event to be called. If additional arguments\nare provided, the listeners will be called with them.\n\n## License\n\nTwo-clause BSD-license, see [LICENSE](https://raw.github.com/busterjs/bane/master/LICENSE)\n","_attachments":{},"homepage":"http://busterjs.org/docs/bane/","bugs":{"url":"https://github.com/busterjs/bane/issues"},"license":"BSD-2-Clause"}