{"versions":{"3.0.0":{"name":"@servie/events","version":"3.0.0","publishConfig":{"access":"public"},"description":"Tiny type-safe event emitter","license":"MIT","repository":{"type":"git","url":"git://github.com/serviejs/events.git"},"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"homepage":"https://github.com/serviejs/events","bugs":{"url":"https://github.com/serviejs/events/issues"},"main":"dist/index.js","scripts":{"format":"ts-scripts format","lint":"ts-scripts lint","prepare":"ts-scripts install && ts-scripts build","size":"size-limit","specs":"ts-scripts specs","test":"ts-scripts test && npm run size"},"keywords":["events","emitter","types","typescript","micro"],"devDependencies":{"@borderless/ts-scripts":"^0.3.0","@size-limit/preset-small-lib":"^4.10.2","@types/jest":"^26.0.22","@types/node":"^14.14.37","size-limit":"^4.10.2","typescript":"^4.2.4"},"types":"dist/index.d.ts","sideEffects":false,"size-limit":[{"path":"dist/index.js","limit":"200 B"}],"gitHead":"c4e55234204cd9e5a77c6698dce918ac08fc5b43","_id":"@servie/events@3.0.0","_nodeVersion":"15.14.0","_npmVersion":"7.9.0","dist":{"shasum":"89863ae789248976be0565558dd420d3b8753bd0","size":5275,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@servie/events/-/events-3.0.0.tgz","integrity":"sha512-Zd79bWhTuG8NvPgSiOcivorJIDg+goMw76TIqYTIR5ua5HOEkS29fmIh2VVSeDeabNF6z8ceTwzB0pSh/BhXyw=="},"_npmUser":{"name":"anonymous","email":"hello@blakeembrey.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hello@blakeembrey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/events_3.0.0_1618353787878_0.3047873361550706"},"_hasShrinkwrap":false,"publish_time":1618353788067,"_cnpm_publish_time":1618353788067,"_cnpmcore_publish_time":"2021-12-17T00:21:12.445Z","contributors":[]},"2.0.1":{"name":"@servie/events","version":"2.0.1","publishConfig":{"access":"public"},"description":"Tiny type-safe event emitter","license":"MIT","repository":{"type":"git","url":"git://github.com/serviejs/events.git"},"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"homepage":"https://github.com/serviejs/events","bugs":{"url":"https://github.com/serviejs/events/issues"},"main":"dist/index.js","scripts":{"format":"ts-scripts format","lint":"ts-scripts lint","prepare":"ts-scripts install && ts-scripts build","size":"size-limit","specs":"ts-scripts specs","test":"ts-scripts test && npm run size"},"keywords":["events","emitter","types","typescript","micro"],"devDependencies":{"@borderless/ts-scripts":"^0.3.0","@size-limit/preset-small-lib":"^4.10.2","@types/jest":"^26.0.22","@types/node":"^14.14.37","size-limit":"^4.10.2","typescript":"^4.2.4"},"types":"dist/index.d.ts","sideEffects":false,"size-limit":[{"path":"dist/index.js","limit":"200 B"}],"gitHead":"f7a2b6e53991d9bb18fc05b1506249fe2fb4662d","_id":"@servie/events@2.0.1","_nodeVersion":"15.12.0","_npmVersion":"7.9.0","dist":{"shasum":"3adcd41828cc5d021b456097719e23986d86a8de","size":4979,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@servie/events/-/events-2.0.1.tgz","integrity":"sha512-pBHYUt2SlMqdsObGI+8qexxwLTZbt8Hvzk6Q7oWiJn2s+zFyjhdFxv+4/Jit1MQ91F4CbfN34Gz25LGp+ZHgAQ=="},"_npmUser":{"name":"anonymous","email":"hello@blakeembrey.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hello@blakeembrey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/events_2.0.1_1617953038795_0.464863009877845"},"_hasShrinkwrap":false,"publish_time":1617953038950,"_cnpm_publish_time":1617953038950,"_cnpmcore_publish_time":"2021-12-17T00:21:12.661Z","contributors":[]},"2.0.0":{"name":"@servie/events","version":"2.0.0","publishConfig":{"access":"public"},"description":"Tiny type-safe event emitter","license":"MIT","repository":{"type":"git","url":"git://github.com/serviejs/tinyevents.git"},"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"homepage":"https://github.com/serviejs/tinyevents","bugs":{"url":"https://github.com/serviejs/tinyevents/issues"},"main":"dist/index.js","scripts":{"format":"ts-scripts format","lint":"ts-scripts lint","prepare":"ts-scripts install && ts-scripts build","size":"size-limit","specs":"ts-scripts specs","test":"ts-scripts test && npm run size"},"keywords":["events","emitter","types","typescript","micro"],"devDependencies":{"@borderless/ts-scripts":"^0.3.0","@size-limit/preset-small-lib":"^4.10.2","@types/jest":"^26.0.22","@types/node":"^14.14.37","size-limit":"^4.10.2","typescript":"^4.2.4"},"types":"dist/index.d.ts","sideEffects":false,"size-limit":[{"path":"dist/index.js","limit":"200 B"}],"gitHead":"afa73af689387319637df96e7802fe2b90251a03","_id":"@servie/events@2.0.0","_nodeVersion":"15.12.0","_npmVersion":"7.9.0","dist":{"shasum":"cc072128950b868a2c59a63cacb6b816fb83690f","size":5065,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@servie/events/-/events-2.0.0.tgz","integrity":"sha512-l1jW/jkdf64+bqWecNFZKap6siDA6LGk/OyHuUOi7PfJQnd+uzu/05JrKbyEv0lCac8o8f/0XLtToBF1/OkB8A=="},"_npmUser":{"name":"anonymous","email":"hello@blakeembrey.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"hello@blakeembrey.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/events_2.0.0_1617933208860_0.26083951967389174"},"_hasShrinkwrap":false,"publish_time":1617933208959,"_cnpm_publish_time":1617933208959,"_cnpmcore_publish_time":"2021-12-17T00:21:12.871Z","contributors":[]},"1.0.0":{"name":"@servie/events","version":"1.0.0","description":"Tiny type-safe event emitter","main":"dist/index.js","types":"dist/index.d.ts","sideEffects":false,"scripts":{"prettier":"prettier --write","lint":"tslint \"src/**/*.ts\" --project tsconfig.json","format":"npm run prettier -- README.md \"src/**/*.{js,ts}\"","build":"rimraf dist && tsc","specs":"jest --coverage","test":"npm run lint && npm run build && npm run specs && npm run size","size":"size-limit","prepare":"npm run build"},"repository":{"type":"git","url":"git://github.com/serviejs/tinyevents.git"},"keywords":["events","emitter","types","typescript","micro"],"author":{"name":"Blake Embrey","email":"hello@blakeembrey.com","url":"http://blakeembrey.me"},"license":"MIT","bugs":{"url":"https://github.com/serviejs/tinyevents/issues"},"homepage":"https://github.com/serviejs/tinyevents","size-limit":[{"path":"dist/index.js","limit":"200 B"}],"jest":{"roots":["<rootDir>/src/"],"transform":{"\\.tsx?$":"ts-jest"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,json,css,md}":["npm run prettier","git add"]},"publishConfig":{"access":"public"},"devDependencies":{"@types/jest":"^24.0.13","@types/node":"^12.0.7","husky":"^2.4.0","jest":"^24.8.0","lint-staged":"^8.2.0","prettier":"^1.18.2","size-limit":"^1.3.6","ts-jest":"^24.0.2","tslint":"^5.17.0","tslint-config-prettier":"^1.18.0","tslint-config-standard":"^8.0.1","typescript":"^3.5.1"},"gitHead":"4be58dc2965b1f96a43dee0f352c29b3590a5663","_id":"@servie/events@1.0.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"shasum":"8258684b52d418ab7b86533e861186638ecc5dc1","size":5179,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@servie/events/-/events-1.0.0.tgz","integrity":"sha512-sBSO19KzdrJCM3gdx6eIxV8M9Gxfgg6iDQmH5TIAGaUu+X9VDdsINXJOnoiZ1Kx3TrHdH4bt5UVglkjsEGBcvw=="},"maintainers":[{"name":"anonymous","email":"hello@blakeembrey.com"}],"_npmUser":{"name":"anonymous","email":"hello@blakeembrey.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/events_1.0.0_1560316883520_0.028145683388050013"},"_hasShrinkwrap":false,"publish_time":1560316883722,"_cnpm_publish_time":1560316883722,"_cnpmcore_publish_time":"2021-12-17T00:21:13.174Z","contributors":[]}},"dist-tags":{"latest":"3.0.0"},"name":"@servie/events","time":{"created":"2022-01-27T07:17:28.767Z","modified":"2023-05-13T02:54:39.405Z","3.0.0":"2021-04-13T22:43:08.067Z","2.0.1":"2021-04-09T07:23:58.950Z","2.0.0":"2021-04-09T01:53:28.959Z","1.0.0":"2019-06-12T05:21:23.722Z"},"readme":"# Events\n\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n[![Build status][build-image]][build-url]\n[![Build coverage][coverage-image]][coverage-url]\n[![Bundle size][bundlephobia-image]][bundlephobia-url]\n\n> Tiny type-safe event emitter.\n\n## Installation\n\n```\nnpm install @servie/events --save\n```\n\n## Usage\n\n```ts\nimport { Emitter, once, ALL_EVENTS } from \"@servie/events\";\n\n// Define an events interface using keys & argument tuples.\ninterface Events {\n  test: [boolean];\n  other: [string];\n}\n\n// Initialize an `Emitter` using your `Events` interface.\nconst events = new Emitter<Events>();\n\n// Add or remove listeners.\nconst listener = (...args) => console.log(args);\nconst off = events.on(\"test\", listener);\n\n// Emit an event.\nevents.emit(\"test\", true);\n\n// Listen to _all_ events, i.e. for debugging.\nconst eachListener = ({ type, args }) => console.log(type, args);\nconst off = events.on(ALL_EVENTS, eachListener);\n\n// \"Once\" utility.\nconst runOnce = (...args) => console.log(args);\nonce(events, \"test\", runOnce);\n\n// Remove the listener.\noff();\n```\n\n## TypeScript\n\nThis project is written using [TypeScript](https://github.com/Microsoft/TypeScript) and publishes the definitions directly to NPM.\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/@servie/events\n[npm-url]: https://npmjs.org/package/@servie/events\n[downloads-image]: https://img.shields.io/npm/dm/@servie/events\n[downloads-url]: https://npmjs.org/package/@servie/events\n[build-image]: https://img.shields.io/github/workflow/status/serviejs/events/CI/main\n[build-url]: https://github.com/serviejs/events/actions/workflows/ci.yml?query=branch%3Amain\n[coverage-image]: https://img.shields.io/codecov/c/gh/serviejs/events\n[coverage-url]: https://codecov.io/gh/serviejs/events\n[bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/@servie/events.svg\n[bundlephobia-url]: https://bundlephobia.com/result?p=@servie/events","users":{}}