{"name":"tiny-emitter","version":"2.1.0","description":"A tiny (less than 1k) event emitter library","main":"index.js","scripts":{"test-node":"tape test/index.js | tap-format-spec","test":"testling | tap-format-spec","bundle":"browserify index.js > dist/tinyemitter.js -s TinyEmitter && echo 'Bundled'","minify":"uglifyjs dist/tinyemitter.js -o dist/tinyemitter.min.js -m && echo 'Minified'","build":"npm test && npm run bundle && npm run minify","size":"uglifyjs index.js -o minified.js -m && ls -l && rm minified.js"},"repository":{"type":"git","url":"git+https://github.com/scottcorgan/tiny-emitter.git"},"keywords":["event","emitter","pubsub","tiny","events","bind"],"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/tiny-emitter/issues"},"devDependencies":{"@tap-format/spec":"0.2.0","browserify":"11.2.0","tape":"4.2.1","testling":"1.7.1","uglify-js":"2.5.0"},"testling":{"files":["test/index.js"],"browsers":["iexplore/10.0","iexplore/9.0","firefox/16..latest","chrome/22..latest","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"a6026cc94da5d2d164104dd30586eee6bb4fb29c","homepage":"https://github.com/scottcorgan/tiny-emitter#readme","_id":"tiny-emitter@2.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"dist":{"integrity":"sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==","shasum":"1d1a56edfc51c43e863cbb5382a72330e3555423","tarball":"http://registry-npm.ywwl.com/tiny-emitter/download/tiny-emitter-2.1.0.tgz","fileCount":10,"unpackedSize":77178,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWa6FCRA9TVsSAnZWagAAg5UP/1hFRSNs+J7T0dZ+okZl\nRqw0p0QT8MCOHTkPS6FaLevkPMcXKMuG+ZIlshfHmfKN0ablFgCMrIq4LrJa\nocZhOS5iBqHA9v5+qh74xnxyLrUgZN3INS0LJ5lMsSR+/04ivjNpcQgWZMn1\n7v4SpjCFAQtZH36zFQvrJzN40j+XsUvIItrYYe614gnmVOrtlh5r27VmlgQM\ndPhNgY6JIXCB8tg5jGn0VR63vJ5Q1TeNAdrswnnjueGLcrqDWOhVE6EVQauC\nM31R6oXA7miA4qIWSBAOXV7l7ZaC/DKCcJEgCuQOkQMq2aNH8JVHwePMAIP6\nwNipSC/NoiT0zTk2fX22e3knodJHH5JWJZIsRU0UZSChQ63nGtr+rgGhXAzd\nKitF2v0QFj6fHDhbuOsHQ5Lj7/6s9AKQKYyqPUDooVpFObXpqA0Ctcw1D7BA\nVc5tHJ3j/HLsg2ZdlaSUd2y0p5rez/4YTkDaA38SRMJcw9JltP2fVAypo6ck\n3xHu81lxQtE9FO61ZzgIACN5rPBmiVI6T26up0aWCLeicTzR/G21fsD1TJN9\nl7OPohk1z3DEaXTudpU09ZzUPcXZL2Ay9DG7Qy5u2mBL0gWJC8VMDmVgj9B9\nXef69mwVL1Ogz8ykkSpPJIl9wQ2O+Ww408/4lS7amCNqqVAhsv5OpbmLb+cF\nRCSK\r\n=SsCo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFeFiZe9WgMexP55TmHk5aNnjsk8i9O4A0kgWYtxKBBPAiEA6ObBjEvejj66rj5AyE4aHLgc+KSpfUsxBlSZWw+/PWw="}],"size":22344,"noattachment":false,"key":"/tiny-emitter/-/tiny-emitter-2.1.0.tgz"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-emitter_2.1.0_1549381252634_0.40391833556455703"},"_hasShrinkwrap":false,"readme":"# tiny-emitter\n\nA tiny (less than 1k) event emitter library.\n\n## Install\n\n### npm\n\n```\nnpm install tiny-emitter --save\n```\n\n## Usage\n\n```js\nvar Emitter = require('tiny-emitter');\nvar emitter = new Emitter();\n\nemitter.on('some-event', function (arg1, arg2, arg3) {\n //\n});\n\nemitter.emit('some-event', 'arg1 value', 'arg2 value', 'arg3 value');\n```\n\nAlternatively, you can skip the initialization step by requiring `tiny-emitter/instance` instead. This pulls in an already initialized emitter.\n\n```js\nvar emitter = require('tiny-emitter/instance');\n\nemitter.on('some-event', function (arg1, arg2, arg3) {\n //\n});\n\nemitter.emit('some-event', 'arg1 value', 'arg2 value', 'arg3 value');\n```\n\n## Instance Methods\n\n### on(event, callback[, context])\n\nSubscribe to an event\n\n* `event` - the name of the event to subscribe to\n* `callback` - the function to call when event is emitted\n* `context` - (OPTIONAL) - the context to bind the event callback to\n\n### once(event, callback[, context])\n\nSubscribe to an event only **once**\n\n* `event` - the name of the event to subscribe to\n* `callback` - the function to call when event is emitted\n* `context` - (OPTIONAL) - the context to bind the event callback to\n\n### off(event[, callback])\n\nUnsubscribe from an event or all events. If no callback is provided, it unsubscribes you from all events.\n\n* `event` - the name of the event to unsubscribe from\n* `callback` - the function used when binding to the event\n\n### emit(event[, arguments...])\n\nTrigger a named event\n\n* `event` - the event name to emit\n* `arguments...` - any number of arguments to pass to the event subscribers\n\n## Test and Build\n\nBuild (Tests, Browserifies, and minifies)\n\n```\nnpm install\nnpm run build\n```\n\nTest\n\n```\nnpm install\nnpm test\n```\n\n## License\n\n[MIT](https://github.com/scottcorgan/tiny-emitter/blob/master/LICENSE)\n","publish_time":1549381252734,"_cnpm_publish_time":1549381252734,"dist-tags":{"latest":"2.1.0"}}