{"_id":"@antfu/ts-event","_rev":"3-31923e868aee5aad567190f6d21df0a7","name":"@antfu/ts-event","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@antfu/ts-event","version":"0.1.0","description":"Typescript Event Emitter","main":"dist/main/index.js","typings":"dist/main/index.d.ts","module":"dist/module/index.js","repository":{"type":"git","url":"git+https://github.com/antfu/tsevent.git"},"license":"MIT","keywords":[],"scripts":{"build":"run-s clean && run-p build:*","build:main":"tsc -p tsconfig.json","build:module":"tsc -p tsconfig.module.json","test":"jest","lint":"eslint --ext .ts,.js,.vue --ignore-path .gitignore .","lint:fix":"eslint --fix --ext .ts,.js,.vue --ignore-path .gitignore .","watch":"run-s clean build:main && run-p \"build:main -- -w\" \"test -- --watch\"","doc":"run-s doc:html && open-cli dist/docs/index.html","doc:html":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out dist/docs","doc:json":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json dist/docs/typedoc.json","doc:publish":"gh-pages -m \"docs: updates [ci skip]\" -d dist/docs","version":"standard-version","publish":"standard-version && git push --follow-tags && npm publish","reset":"git clean -dfx && git reset --hard && npm i","clean":"rimraf dist"},"engines":{"node":">=8.9"},"publishConfig":{"access":"public"},"dependencies":{},"devDependencies":{"@antfu/eslint-config-ts":"^0.2.2","@types/jest":"^24.0.16","@types/node":"^12.6.8","eslint":"^6.1.0","eslint-plugin-jest":"^22.14.0","gh-pages":"^2.0.1","jest":"^24.8.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","standard-version":"^6.0.1","ts-jest":"^24.0.2","typescript":"^3.5.3"},"standard-version":{"types":[{"type":"feat","section":"⚡ Features"},{"type":"fix","section":"🐞 Bug Fixes"},{"type":"refactor","section":"🔮 Refactor"},{"type":"test","section":"⚗ Tests"},{"type":"docs","section":"📚 Documentations"},{"type":"ci","hidden":true}]},"gitHead":"a7f504df6ddda5aa4271813ce8b9003631f3c343","bugs":{"url":"https://github.com/antfu/tsevent/issues"},"homepage":"https://github.com/antfu/tsevent#readme","_id":"@antfu/ts-event@0.1.0","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-f2zg03Jo0lUCEVyD0ETStgZD37nwuWEK6g9NSRKnorBKOFdQI+FNcGTWPFBORKUbOl4CzkNgmJiq5kQMYCPpAQ==","shasum":"3c622fc61f2b5aa3cc9b9a06385aae149bb70406","tarball":"https://registry.npmjs.org/@antfu/ts-event/-/ts-event-0.1.0.tgz","fileCount":16,"unpackedSize":21078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdP8PTCRA9TVsSAnZWagAAkA8P/0CBZAQFFK4dh1BnMlYp\nQHo+yUZejLCm8krPGe0Asu35IiSyqTA/v5f+vc17G13zJ1uNkHVIZ+YjoRSM\nVUbLQk67f8JuGG93cZ3R1p8aa6NMM1nlIxHhen7id/+5T7IR/OqEQC8fRrEO\nTPkqRIZasonIsnhvxH+rNrtxKQT1sAytlCG2vjQZEuuU1WhiTaYHv4tE1UzE\ng6Ei8I7s3lKmYP09DhKYXS10Czh3YGJoRmn8pnq4dkMOFSJ5x+/6YknYx5zo\nNx3Lc7iVUP2rv5hxqMKedU/9xdrXQ5yXXh4qIWhXrVRNctrcGFiGOCU+hG+Z\nbuhDXwjuG4BJxeKjz3P6WGzl9xUHj/IRknIW7UVl06EQgI2tg0Xk6i62wBGs\n2yFeu0H/QuAb5PcOugD7Q/VN3D/KLervtTQ25N0EUgsBK+EpZJgErryRaaPc\neYHuCUtZ8aLsD9ISZy/C+DSA2Lm07InhJ/L5e3CfoQeixgjPayxwTr9fB6KB\n7Pz8TqQq9v3bJ3LwYCT75aPjZaPJD1YOl0c/IlqqYNKNA8ImpJp7p6An8vrz\nyVvZma+lDRG2tDNaqRc5YjIL/MKX6+iDO+LJYHfCX74efdDuyeAY1n4hbOAA\nficJK8XNffSliFAdKtF/3UUTayJE6ZEll4bQhYct7eVKjVWY7rWQ2yxBimXk\nsjti\r\n=mbZU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfT45gCV635yv+mNqwTy3DYGZ3dX0VBEEZt6orN8EV4wIgUacczzSOlh2mFRfWdbI9nOPynoIeySNgzvhkdqYXBjA="}]},"maintainers":[{"name":"antfu","email":"anthonyfu117@hotmail.com"}],"_npmUser":{"name":"antfu","email":"anthonyfu117@hotmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-event_0.1.0_1564459986357_0.9247333937738655"},"_hasShrinkwrap":false},"0.1.1":{"name":"@antfu/ts-event","version":"0.1.1","description":"Typescript Event Emitter","main":"dist/main/index.js","typings":"dist/main/index.d.ts","module":"dist/module/index.js","repository":{"type":"git","url":"git+https://github.com/antfu/tsevent.git"},"license":"MIT","keywords":[],"scripts":{"build":"run-s clean && run-p build:*","build:main":"tsc -p tsconfig.json","build:module":"tsc -p tsconfig.module.json","test":"jest","lint":"eslint --ext .ts,.js,.vue --ignore-path .gitignore .","lint:fix":"eslint --fix --ext .ts,.js,.vue --ignore-path .gitignore .","watch":"run-s clean build:main && run-p \"build:main -- -w\" \"test -- --watch\"","doc":"run-s doc:html && open-cli dist/docs/index.html","doc:html":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out dist/docs","doc:json":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json dist/docs/typedoc.json","doc:publish":"gh-pages -m \"docs: updates [ci skip]\" -d dist/docs","version":"standard-version","publish":"standard-version && git push --follow-tags && npm publish","reset":"git clean -dfx && git reset --hard && npm i","clean":"rimraf dist"},"engines":{"node":">=8.9"},"publishConfig":{"access":"public"},"dependencies":{},"devDependencies":{"@antfu/eslint-config-ts":"^0.2.2","@types/jest":"^24.0.16","@types/node":"^12.6.8","eslint":"^6.1.0","eslint-plugin-jest":"^22.14.0","gh-pages":"^2.0.1","jest":"^24.8.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","standard-version":"^6.0.1","ts-jest":"^24.0.2","typescript":"^3.5.3"},"standard-version":{"types":[{"type":"feat","section":"⚡ Features"},{"type":"fix","section":"🐞 Bug Fixes"},{"type":"refactor","section":"🔮 Refactor"},{"type":"test","section":"⚗ Tests"},{"type":"docs","section":"📚 Documentations"},{"type":"ci","hidden":true}]},"gitHead":"1daab5e2ca7d47a2ef0d9b82ed2e2f1cd994d806","bugs":{"url":"https://github.com/antfu/tsevent/issues"},"homepage":"https://github.com/antfu/tsevent#readme","_id":"@antfu/ts-event@0.1.1","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-XfJ+y0AzgGAK+2uUrQBI3SL7WfV0aytnQ6WlRePEZJuwbjsI3J70briW0QtlDklMByM2AyljwO6usZdw95cdDg==","shasum":"f76259e2c77e4c6454622492cc397e12174b7b27","tarball":"https://registry.npmjs.org/@antfu/ts-event/-/ts-event-0.1.1.tgz","fileCount":16,"unpackedSize":21164,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdP8PiCRA9TVsSAnZWagAASDkP/iJv4sUswKyfVZ2RV0jE\nLUj/V1V5opgxCpq2PutIv75/NyXj51+6NXudkBcqlmDBTCxGqEXcavNyQbo+\nhnGC6BOxV+ZYh1tcmBbia0+6zxvaXB+0TJE2vBYVrsSBohF3BH6nOTSsMYmr\ngcLnEs7jvZcpc9q04R8jCIAnAJW6ngMTNw8mtoobwcvie4xF6O2oRI/Uk/Qz\nj/UUKep4iQU8apImoPSTQxjDKOoe2rqgV4pbJv8AnR+lIb6vp3SOy36BGczy\n5K7nW4wRdLnFk9BgP8RAy6147VjGbH/Ttr5om09VZhLcmhB35ESBeYUh9CZk\nYQy4qPuwTJYjKIcGSVZDUbdkCWeI/WURPFy7SJNMIcHLs4DAv6qKM8GSm1rE\nuz3GleDBZSZmI+4ryIhlA9d2Hjh94IVn5St+IWU/HDkvEqCOtLspkaHK4WRi\nwlMseEWI0tdeSW90Aby1CLGUC9lB6I+mlIawJKeJLCFytkwncoWN4OvNDDi5\nBYt7+7dh55E0qC4i0CpFNvmZ4AIxvUAPn842bGCR9yZER80qrcvGc9UtXA3p\nVD4SKF+nan0VT4HPdPMDTsLbnyGU1ndMn7nXsDE9mm+KdZ7jpZgRH/eNWiFo\nLjrWVWHBJKicebHfQK5B40t/MlzoX97/bYbWe8UOI6tf6jsldztkfREHgyW4\nBdHB\r\n=5WPu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtfMb+Ussr5caON58a1rQxmuWvIMRACC19jX+Drfs6VwIhAKYUwqudR9WMwK06B1H6vOSrNOGScFlZvkkDw16+iCXz"}]},"maintainers":[{"name":"antfu","email":"anthonyfu117@hotmail.com"}],"_npmUser":{"name":"antfu","email":"anthonyfu117@hotmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-event_0.1.1_1564460001643_0.8934731397010016"},"_hasShrinkwrap":false},"0.1.2":{"name":"@antfu/ts-event","version":"0.1.2","description":"Typescript Event Emitter","main":"dist/main/index.js","typings":"dist/main/index.d.ts","module":"dist/module/index.js","repository":{"type":"git","url":"git+https://github.com/antfu/tsevent.git"},"license":"MIT","keywords":[],"scripts":{"build":"run-s clean && run-p build:*","build:main":"tsc -p tsconfig.json","build:module":"tsc -p tsconfig.module.json","test":"jest","lint":"eslint --ext .ts,.js,.vue --ignore-path .gitignore .","lint:fix":"eslint --fix --ext .ts,.js,.vue --ignore-path .gitignore .","watch":"run-s clean build:main && run-p \"build:main -- -w\" \"test -- --watch\"","doc":"run-s doc:html && open-cli dist/docs/index.html","doc:html":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out dist/docs","doc:json":"typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json dist/docs/typedoc.json","doc:publish":"gh-pages -m \"docs: updates [ci skip]\" -d dist/docs","version":"standard-version","publish":"standard-version && git push --follow-tags && npm publish","reset":"git clean -dfx && git reset --hard && npm i","clean":"rimraf dist"},"engines":{"node":">=8.9"},"publishConfig":{"access":"public"},"dependencies":{},"devDependencies":{"@antfu/eslint-config-ts":"^0.2.2","@types/jest":"^24.0.16","@types/node":"^12.6.8","eslint":"^6.1.0","eslint-plugin-jest":"^22.14.0","gh-pages":"^2.0.1","jest":"^24.8.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","standard-version":"^6.0.1","ts-jest":"^24.0.2","typescript":"^3.5.3"},"standard-version":{"types":[{"type":"feat","section":"⚡ Features"},{"type":"fix","section":"🐞 Bug Fixes"},{"type":"refactor","section":"🔮 Refactor"},{"type":"test","section":"⚗ Tests"},{"type":"docs","section":"📚 Documentations"},{"type":"ci","hidden":true}]},"gitHead":"1349af27fef44478f4029d742687075dffc11123","bugs":{"url":"https://github.com/antfu/tsevent/issues"},"homepage":"https://github.com/antfu/tsevent#readme","_id":"@antfu/ts-event@0.1.2","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-J3y0d3Jfgch5hTPu4E2BPLepqQM0m6w6TLUF6q6psZd11Yvbb1FknTdrjHuhmXVCS80UHuaKi0KdP29PYTAqEQ==","shasum":"8323790d524c3ad364d58d433d6245e742fe7eae","tarball":"https://registry.npmjs.org/@antfu/ts-event/-/ts-event-0.1.2.tgz","fileCount":16,"unpackedSize":21250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdP8PwCRA9TVsSAnZWagAAnt4QAISnIoGrrTJMBf0g4UWo\n0UxPYXeKiTrRzEjG1oB21dkItuWKylsZ+eQeg9/WzaZ6FALmQPte3bF0ChV9\nPVY8j0vMs8S1X4ZAdnbc247N9l2B6F6Mm2flprcYZ/P/4Rqk7R1pB9A3nnyS\nTfjAkI20ki+ErR5lXGeDEl9R5Yj0v9cpSR0FKPlpHSvuQ8eLC+uQLA5cY+k9\nwDVqXvOt4ee0ItfXgFapiZsRY7szXqjZg1X/ZlbaITw+SHKLy7yaGWkPxpEY\nPiKjHv2eugeTbnC3m0qqeDhg9AGwFFSqhBrKGbOxfySXQJ8d/E/nEnSDKGsa\nbgIecETIrdzc/FhJ6ncHvLcghUPQ0tak6miqKWcA0ND5Kg8C3XB0tLSW+rym\neaPA+INMa/xagPws1GqPscW5WLJ84zodEHZXNag0ImBDDH7AWPhVQOcmLmA3\ni5JlhXsKDmTGwXW/IFG3uaQY6Ev4aDAZvkGrBDkpxGWpIPwaVsTeOqMvARDT\nuhIqBbUbs1OZC/nLE9hO/2HtF8YYlGD5LZP2QoVpAAr+3tfF+K+jBN+jQaEQ\nG5tkKtHmyfvh3IpJQyGU46VnF0cUHMEM4kGjQmP+o4aF5LLj8hlZyiPT6IUD\n4ysMir1M3OLH4L2Nass8rC12mvaXDJq0Dih192mIPfrRza4K05uk0eUBu7se\nXVOI\r\n=rNwW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAKOzHmEA8ZINJewvJm0z8VRx3gpTP0pXtp5UPok5J6RAiEAmyKPSqzJGzEMkm2GBlkoRcZ3/QyPFLFHVBxLnjYwEQQ="}]},"maintainers":[{"name":"antfu","email":"anthonyfu117@hotmail.com"}],"_npmUser":{"name":"antfu","email":"anthonyfu117@hotmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-event_0.1.2_1564460016201_0.39833075782050087"},"_hasShrinkwrap":false}},"time":{"created":"2019-07-30T04:13:06.136Z","0.1.0":"2019-07-30T04:13:06.514Z","modified":"2022-04-04T14:21:38.106Z","0.1.1":"2019-07-30T04:13:21.839Z","0.1.2":"2019-07-30T04:13:36.347Z"},"maintainers":[{"name":"antfu","email":"anthonyfu117@hotmail.com"}],"description":"Typescript Event Emitter","homepage":"https://github.com/antfu/tsevent#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/antfu/tsevent.git"},"bugs":{"url":"https://github.com/antfu/tsevent/issues"},"license":"MIT","readme":"<h1><b>TS</b>Event</h1>\n\nTypescript Event Emitter with the same [API of VS Code](https://code.visualstudio.com/api/references/vscode-api#EventEmitter%3CT%3E)\n\n## Basic Usage\n\n```ts\nclass Counter {\n  // define the emitter\n  private _onChanged = new EventEmitter<number>()\n  public readonly onChanged = this._onChanged.event\n\n  private _value = 0\n\n  get value() {\n    return this._value\n  }\n\n  set value(v) {\n    this._value = v\n    this._onChanged.fire(this.value)\n  }\n}\n\nconst counter = new Counter()\n\ncounter.onChanged(n => { // n is number here\n  console.log(`The new value is ${n}`)\n})\n\ncounter.value = 5 // Output: The new value is 5\n```\n\n## License\n\n[MIT](./LICENSE) © [antfu](https://github.com/antfu) 2019\n","readmeFilename":"README.md"}