{"_id":"@whatwg-node/events","_rev":"4333827","name":"@whatwg-node/events","description":"Cross Platform Smart Event API Ponyfill","dist-tags":{"latest":"0.1.2"},"maintainers":[{"name":"ardatan","email":""},{"name":"theguild-bot","email":""}],"time":{"modified":"2026-04-08T00:06:10.000Z","created":"2022-09-20T11:45:59.239Z","0.1.2":"2024-07-29T09:55:41.311Z","0.1.1":"2023-05-25T10:34:01.578Z","0.1.0":"2023-05-17T12:01:14.680Z","0.0.3":"2023-04-23T08:37:03.869Z","0.0.2":"2022-09-20T12:56:19.184Z","0.0.1":"2022-09-20T11:45:59.239Z"},"users":{},"author":{"name":"Arda TANRIKULU","email":"ardatanrikulu@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/ardatan/whatwg-node.git","directory":"packages/events"},"versions":{"0.1.2":{"name":"@whatwg-node/events","version":"0.1.2","description":"Cross Platform Smart Event API Ponyfill","sideEffects":false,"dependencies":{"tslib":"^2.6.3"},"repository":{"type":"git","url":"git+https://github.com/ardatan/whatwg-node.git","directory":"packages/events"},"author":{"name":"Arda TANRIKULU","email":"ardatanrikulu@gmail.com"},"license":"MIT","engines":{"node":">=18.0.0"},"main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./package.json":"./package.json"},"_id":"@whatwg-node/events@0.1.2","gitHead":"1a09d73416a0343ff2f8e01053edb8e9395a3e76","bugs":{"url":"https://github.com/ardatan/whatwg-node/issues"},"homepage":"https://github.com/ardatan/whatwg-node#readme","_nodeVersion":"22.5.1","_npmVersion":"10.8.2","dist":{"shasum":"23f7c7ad887d7fd448e9ce3261eac9ef319ddd7c","size":1449,"noattachment":false,"key":"/@whatwg-node/events/-/@whatwg-node/events-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@whatwg-node/events/download/@whatwg-node/events-0.1.2.tgz"},"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"maintainers":[{"name":"ardatan","email":""},{"name":"theguild-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/events_0.1.2_1722246941179_0.8304623466477816"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-07-29T09:55:41.311Z","publish_time":1722246941311,"_source_registry_name":"default","_cnpm_publish_time":1722246941311},"0.1.1":{"name":"@whatwg-node/events","version":"0.1.1","description":"Cross Platform Smart Event API Ponyfill","repository":{"type":"git","url":"git+https://github.com/ardatan/whatwg-node.git","directory":"packages/events"},"author":{"name":"Arda TANRIKULU","email":"ardatanrikulu@gmail.com"},"license":"MIT","engines":{"node":">=16.0.0"},"main":"dist/node-ponyfill.js","browser":"dist/global-ponyfill.js","types":"dist/index.d.ts","publishConfig":{"access":"public"},"sideEffects":false,"bob":false,"denoify":{"index":"dist/deno-ponyfill.ts"},"react-native":"dist/global-ponyfill.js","gitHead":"59dac0f26b2d258e89071672834fecf9a68aa4ee","bugs":{"url":"https://github.com/ardatan/whatwg-node/issues"},"homepage":"https://github.com/ardatan/whatwg-node#readme","_id":"@whatwg-node/events@0.1.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"0ca718508249419587e130da26d40e29d99b5356","size":1879,"noattachment":false,"key":"/@whatwg-node/events/-/@whatwg-node/events-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@whatwg-node/events/download/@whatwg-node/events-0.1.1.tgz"},"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"maintainers":[{"name":"ardatan","email":""},{"name":"theguild-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/events_0.1.1_1685010841358_0.14341320194265283"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-05-25T10:34:01.578Z","publish_time":1685010841578,"_source_registry_name":"default","_cnpm_publish_time":1685010841578},"0.1.0":{"name":"@whatwg-node/events","version":"0.1.0","description":"Cross Platform Smart Event API Ponyfill","repository":{"type":"git","url":"git+https://github.com/ardatan/whatwg-node.git","directory":"packages/events"},"author":{"name":"Arda TANRIKULU","email":"ardatanrikulu@gmail.com"},"license":"MIT","engines":{"node":">=16.0.0"},"main":"dist/node-ponyfill.js","browser":"dist/global-ponyfill.js","types":"dist/index.d.ts","publishConfig":{"access":"public"},"sideEffects":false,"bob":false,"denoify":{"index":"dist/deno-ponyfill.ts"},"react-native":"dist/global-ponyfill.js","gitHead":"40aa4df3afc6ff948eb537d7d61fb60e0d37d388","bugs":{"url":"https://github.com/ardatan/whatwg-node/issues"},"homepage":"https://github.com/ardatan/whatwg-node#readme","_id":"@whatwg-node/events@0.1.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"1e7b4e4fd0d149b247ec0132b1030fe522282295","size":1754,"noattachment":false,"key":"/@whatwg-node/events/-/@whatwg-node/events-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@whatwg-node/events/download/@whatwg-node/events-0.1.0.tgz"},"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"maintainers":[{"name":"ardatan","email":""},{"name":"theguild-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/events_0.1.0_1684324874468_0.6345999854765207"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-05-17T12:01:14.680Z","publish_time":1684324874680,"_source_registry_name":"default","_cnpm_publish_time":1684324874680},"0.0.3":{"name":"@whatwg-node/events","version":"0.0.3","description":"Cross Platform Smart Event API Ponyfill","repository":{"type":"git","url":"git+https://github.com/ardatan/whatwg-node.git","directory":"packages/events"},"author":{"name":"Arda TANRIKULU","email":"ardatanrikulu@gmail.com"},"license":"MIT","main":"dist/node-ponyfill.js","browser":"dist/global-ponyfill.js","types":"dist/index.d.ts","publishConfig":{"access":"public"},"sideEffects":false,"bob":false,"denoify":{"index":"dist/deno-ponyfill.ts"},"react-native":"dist/global-ponyfill.js","gitHead":"c493a2050d49d97fe97c62d5574c77b0b777b464","bugs":{"url":"https://github.com/ardatan/whatwg-node/issues"},"homepage":"https://github.com/ardatan/whatwg-node#readme","_id":"@whatwg-node/events@0.0.3","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"13a65dd4f5893f55280f766e29ae48074927acad","size":2664,"noattachment":false,"key":"/@whatwg-node/events/-/@whatwg-node/events-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@whatwg-node/events/download/@whatwg-node/events-0.0.3.tgz"},"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"maintainers":[{"name":"ardatan","email":""},{"name":"theguild-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/events_0.0.3_1682239023693_0.2912809180235747"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-04-23T08:37:03.869Z","publish_time":1682239023869,"_cnpm_publish_time":1682239023869},"0.0.2":{"name":"@whatwg-node/events","version":"0.0.2","description":"Cross Platform Smart Event API Ponyfill","author":{"name":"Arda TANRIKULU","email":"ardatanrikulu@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/ardatan/whatwg-node.git","directory":"packages/events"},"license":"MIT","sideEffects":false,"main":"dist/node-ponyfill.js","browser":"dist/global-ponyfill.js","react-native":"dist/global-ponyfill.js","types":"dist/index.d.ts","denoify":{"index":"dist/deno-ponyfill.ts"},"publishConfig":{"access":"public"},"gitHead":"f10f238b17fa4bae2f70e62c1c914214f79e3f99","bugs":{"url":"https://github.com/ardatan/whatwg-node/issues"},"homepage":"https://github.com/ardatan/whatwg-node#readme","_id":"@whatwg-node/events@0.0.2","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"shasum":"7b7107268d2982fc7b7aff5ee6803c64018f84dd","size":2122,"noattachment":false,"key":"/@whatwg-node/events/-/@whatwg-node/events-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@whatwg-node/events/download/@whatwg-node/events-0.0.2.tgz"},"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"maintainers":[{"name":"ardatan","email":""},{"name":"theguild-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/events_0.0.2_1663678578987_0.020247791032657503"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-20T13:35:09.948Z","publish_time":1663678579184,"_cnpm_publish_time":1663678579184},"0.0.1":{"name":"@whatwg-node/events","version":"0.0.1","description":"Cross Platform Smart Event API Ponyfill","author":{"name":"Arda TANRIKULU","email":"ardatanrikulu@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/ardatan/whatwg-node.git","directory":"packages/events"},"license":"MIT","sideEffects":false,"main":"dist/node-ponyfill.js","browser":"dist/global-ponyfill.js","react-native":"dist/global-ponyfill.js","types":"dist/index.d.ts","denoify":{"index":"dist/deno-ponyfill.ts"},"publishConfig":{"access":"public"},"gitHead":"9d87848245a7efd5e70dd2f7a40ab0dbc65f49d4","bugs":{"url":"https://github.com/ardatan/whatwg-node/issues"},"homepage":"https://github.com/ardatan/whatwg-node#readme","_id":"@whatwg-node/events@0.0.1","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"shasum":"bb64b0060fcb413386cdbf4754ccaf8b88f47918","size":1829,"noattachment":false,"key":"/@whatwg-node/events/-/@whatwg-node/events-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@whatwg-node/events/download/@whatwg-node/events-0.0.1.tgz"},"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"maintainers":[{"name":"ardatan","email":""},{"name":"theguild-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/events_0.0.1_1663674359081_0.3553874758871025"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-20T12:31:07.992Z","publish_time":1663674359239,"_cnpm_publish_time":1663674359239}},"readme":"# `@whatwg-node/events`\n\nA ponyfill package for JavaScript [DOM Events Standard](https://dom.spec.whatwg.org/#events). If\nyour JavaScript environment doesn't implement this standard natively, this package automatically\nponyfills the missing parts, and export them as a module.\n\n## Installation\n\n```bash\nyarn add @whatwg-node/events\n```\n\n## Usage\n\n```ts\nimport { Event, EventTarget } from '@whatwg-node/events'\n\nconst target = new EventTarget()\ntarget.addEventListener('foo', (event: Event) => {\n  console.log(event.type) // foo\n})\n\ntarget.dispatchEvent(new Event('foo'))\n```\n\n> If your environment already implements these natively, this package will export the native ones\n> automatically.\n\n## Custom Events\n\n```ts\nimport { CustomEvent, EventTarget } from '@whatwg-node/events'\n\nconst target = new EventTarget()\ntarget.addEventListener('foo', (event: CustomEvent) => {\n  console.assert(event.detail.foo, 'bar')\n})\n\n// `detail` can take any value\ntarget.dispatchEvent(new CustomEvent('foo', { detail: { foo: 'bar' } }))\n```\n\n## API\n\nThe following classes are exported by this package:\n\n- [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event)\n- [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent)\n- [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget)\n","_attachments":{},"homepage":"https://github.com/ardatan/whatwg-node#readme","bugs":{"url":"https://github.com/ardatan/whatwg-node/issues"},"license":"MIT"}