{"versions":{"2.0.2":{"name":"@migrate-to-esm/tiny-emitter","version":"2.0.2","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 cjs/index.js > dist/tinyemitter.js -s TinyEmitter && echo 'Bundled'","minify":"uglifyjs dist/tinyemitter.js -o dist/tinyemitter.min.js -m && echo 'Minified'","build":"rollup --config ; 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","rollup":"^0.67.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":"b595a070e4629714f1a6b5ead023cb89a377d804","homepage":"https://github.com/scottcorgan/tiny-emitter#readme","_id":"@migrate-to-esm/tiny-emitter@2.0.2","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"anonymous","email":"horacio.gonzalez@gmail.com"},"dist":{"integrity":"sha512-4RHPzP7HEN9zhFRYwEFZYCbNavpOy5k/xzU6BbUTmz3xnfrOvd9rr4McCRO0o8vgSKrFI6s31IYfjfn2r8STbg==","shasum":"949596cf7fc8ed3e74c3538b9bc6e7a8eb02bd35","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@migrate-to-esm/tiny-emitter/-/tiny-emitter-2.0.2.tgz","fileCount":13,"unpackedSize":80457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4Tv7CRA9TVsSAnZWagAAqEUQAKTif2MaqXJaL6WjuQYf\ndHP/qoAJ/UPG3w7QUVXfHMUT5mi6g3MKohTHYWKoWsLv5OZ3tEwHYGCUB5Wi\nion3Qr673HrGZm7b80c0Mx5ES12e62wJOqpHoc61xlUSmp+vnyvw0UiQSj+9\nVCBHlCr0U4/y72lSlTbPkbbcnRhphdnrcX+j+gc8fz6gnoxZQC9DbXTLPJyy\nQGvWMi9OAXlTHhUt8NoS+vkvPmcrOy8XOYwze7a3eNOKEgtN4Yof/Gp/HBHY\nzzryX895IC2rTIaLNrE2SFsN9mH409kkx5DxFzmET11/6LpDlQKfl9CuXZMK\nzY4qDgaiToH6UyDam2lynjmt4kDdFKEVKWrnSzA/qnFnYPUXbgeuUa0tSFo+\nmv/8ozGWD8f6iQtiGwQewp7vlN4agLDMTTfBvYc733bkLfGhRpUt1+lw/Qtk\nF2aEUiYQoUuwShkwx2Qq3kmm0E+vacGkUqdERhcFrocw0b3+r1x2IhjcBJ0p\nHlwBaNsPrLY7zkBe0lYJAAN6UyPIR/QcGKjtGNheO9Yuk2MlcaZKyGel0S3S\nA+ryYxfQ6X1BsymAtBSyU81IRvycXYB6R4oDc7UD3ZtgTKGKDbx0KKKr0qiw\ngb69mcYL5jMDz6WImLakNqvhoTLQqLvY7OtCJJtXVHkK6R63h0fKDKvGXgcI\nzIV+\r\n=YEg9\r\n-----END PGP SIGNATURE-----\r\n","size":22559},"maintainers":[{"name":"anonymous","email":"horacio.gonzalez@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-emitter_2.0.2_1541487610670_0.482411735373099"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-23T03:36:07.905Z","contributors":[]}},"dist-tags":{"latest":"2.0.2"},"name":"@migrate-to-esm/tiny-emitter","time":{"created":"2022-01-26T20:05:56.164Z","modified":"2022-01-26T20:05:56.164Z","2.0.2":"2018-11-06T07:00:10.775Z"},"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)","users":{}}