{"_id":"delegate-events","_rev":"28649","name":"delegate-events","description":"Event delegation component","dist-tags":{"latest":"1.1.1"},"maintainers":[{"name":"henrikjoreteg","email":"henrik@andyet.net"}],"time":{"modified":"2021-06-03T10:04:17.000Z","created":"2014-02-24T05:53:33.971Z","1.1.1":"2015-05-13T17:32:29.507Z","1.1.0":"2014-04-08T05:16:23.875Z","1.0.0":"2014-02-24T05:53:33.971Z"},"users":{"etoxin":true},"repository":{"type":"git","url":"git://github.com/HenrikJoreteg/delegate.git"},"versions":{"1.1.1":{"name":"delegate-events","description":"Event delegation component","version":"1.1.1","dependencies":{"closest":"*","component-event":"*"},"devDependencies":{"browserify":"^3.33.0"},"keywords":["delegate","delegation","event","events"],"repository":{"type":"git","url":"git://github.com/HenrikJoreteg/delegate.git"},"scripts":{"test":"browserify test/test.js > test/test.bundle.js && echo 'Now open test/index.html in a browser to test'"},"gitHead":"939b9aa8673dd5ca843f71fd890b82f736decb23","bugs":{"url":"https://github.com/HenrikJoreteg/delegate/issues"},"homepage":"https://github.com/HenrikJoreteg/delegate","_id":"delegate-events@1.1.1","_shasum":"dab490a9c1f1d40ca40ebcd21edaf717b671d4d4","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.1","_npmUser":{"name":"henrikjoreteg","email":"henrik@andyet.net"},"maintainers":[{"name":"henrikjoreteg","email":"henrik@andyet.net"}],"dist":{"shasum":"dab490a9c1f1d40ca40ebcd21edaf717b671d4d4","size":2550,"noattachment":false,"key":"/delegate-events/-/delegate-events-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/delegate-events/download/delegate-events-1.1.1.tgz"},"directories":{},"publish_time":1431538349507,"_cnpm_publish_time":1431538349507,"_hasShrinkwrap":false},"1.1.0":{"name":"delegate-events","description":"Event delegation component","version":"1.1.0","browser":{"event":"component-event"},"dependencies":{"closest":"*","component-event":"*"},"devDependencies":{"browserify":"^3.33.0"},"keywords":["event","events","delegate","delegation"],"repository":{"type":"git","url":"git://github.com/HenrikJoreteg/delegate.git"},"scripts":{"test":"browserify test/test.js > test/test.bundle.js && echo 'Now open test/index.html in a browser to test'"},"bugs":{"url":"https://github.com/HenrikJoreteg/delegate/issues"},"homepage":"https://github.com/HenrikJoreteg/delegate","_id":"delegate-events@1.1.0","dist":{"shasum":"3f63295c1697121850e99ad676944c772283faa3","size":2543,"noattachment":false,"key":"/delegate-events/-/delegate-events-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delegate-events/download/delegate-events-1.1.0.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"henrikjoreteg","email":"henrik@andyet.net"},"maintainers":[{"name":"henrikjoreteg","email":"henrik@andyet.net"}],"directories":{},"publish_time":1396934183875,"_cnpm_publish_time":1396934183875,"_hasShrinkwrap":false},"1.0.0":{"name":"delegate-events","description":"Event delegation component","version":"1.0.0","keywords":["event","events","delegate","delegation"],"dependencies":{"component-event":"*","closest":"*"},"browser":{"event":"component-event"},"repository":{"type":"git","url":"git://github.com/HenrikJoreteg/delegate.git"},"bugs":{"url":"https://github.com/HenrikJoreteg/delegate/issues"},"homepage":"https://github.com/HenrikJoreteg/delegate","_id":"delegate-events@1.0.0","dist":{"shasum":"063daae0844be593820cd055f70f8e8c4d5b2553","size":1778,"noattachment":false,"key":"/delegate-events/-/delegate-events-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delegate-events/download/delegate-events-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"henrikjoreteg","email":"henrik@andyet.net"},"maintainers":[{"name":"henrikjoreteg","email":"henrik@andyet.net"}],"directories":{},"publish_time":1393221213971,"_cnpm_publish_time":1393221213971,"_hasShrinkwrap":false}},"readme":"\n# delegate\n\n  Low-level event delegation component. Forked from component/delegate for use with browserify.\n\n## Installation\n\n    $ npm install delegate-events\n\n## Example\n\n```js\nvar delegate = require('delegate-events');\nvar ul = document.querySelector('ul');\nvar n = 0;\n\nvar fn = delegate.bind(ul, 'li a', 'click', function(e){\n  console.log(e.target);\n  console.log(e.delegateTarget); // => \"<a>\"\n  if (++n == 3) {\n    console.log('unbind');\n    delegate.unbind(ul, 'click', fn, false);\n  }\n}, false);\n```\n\n## API\n\n### .bind(el, selector, type, callback, [capture])\n\n  Bind and return a callback which may be passed to `.unbind()`.\n\n### .unbind(el, type, callback, [capture])\n\n  Unbind.\n\n## Tests\n\n* Run `npm test`.\n* Open `test/index.html` in a browser.\n* Open the js console and verify that interacting with the elements works as they say they should.\n\n## License\n\n  MIT\n","_attachments":{},"homepage":"https://github.com/HenrikJoreteg/delegate","bugs":{"url":"https://github.com/HenrikJoreteg/delegate/issues"}}