{"name":"@whatwg-node/events","version":"0.0.3-rc-20230423082701-935af9d","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","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","readmeFilename":"README.md","gitHead":"935af9db4ad356b4921facf637774664332de8f5","bugs":{"url":"https://github.com/ardatan/whatwg-node/issues"},"homepage":"https://github.com/ardatan/whatwg-node#readme","_id":"@whatwg-node/events@0.0.3-rc-20230423082701-935af9d","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-4XB1hDtWacKY7j3I1jvE6bhqd7Or3A7/MVjQq4svbZtAGbjodiMhmsp1r/Z96yL1I0gk9Z9vEwdfTW7YIFvtBg==","shasum":"0884e3d321c615713732e62dbc6e9334c99baa16","tarball":"http://registry-npm.ywwl.com/@whatwg-node/events/download/@whatwg-node/events-0.0.3-rc-20230423082701-935af9d.tgz","fileCount":8,"unpackedSize":8065,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCG5UWXgO/bsYwBr+DAfwWoD+eOF2mMqy0hIDj2YmijIgIgNY8lkvyNPEbwPD3naJwo2Y6R+Imx4ZCUP28Y24wBN7E="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkROvsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrtvg//WCNla2MhP8puYE88Y6Fmlhq9wcgMU8D+kBNUXLy1T00k7kIP\r\n1WxHSQeCu6QaSt6wiJ8WJ6dZoiNgE3Y/g7XIk8FsbZOYDxAdf4np8dDsZ1P/\r\noBNhvl1SC+9qt3m2Pbwi2rdZw0YL4LnMEFV1wx7giNq6ZCTHDlkpkjl85KDz\r\n7TxBoKsrJtdKn0KNjVKuKXZgmE7rKWzE3P1jojo87WDMqdQArMoTSPlJBAkB\r\n9uawoRajQmjkWfS77Tk6o2Lv7BP1QcoS2BS0gyVBU/PvYmM0FVDJeQ1ZW34l\r\nOu1FEJ9vI5PT/SaE8Y3pTmAe4b0D0lgs6+rFZShwbwXtzumNsRHAjGW7yERp\r\nyuOTbqU4d95S/q4RxcNnLuT560/+5AeLdP5c4myfkKZYnupdP6d8VLysPgYP\r\ntsDeIEFVpuCnxIJpzhIDuD+64ljj7S4PGAzd1MNUIbYfyUhtlDwA8NWuhtsz\r\nOkeQRkc85d/+XSeITf1KJk2obmqfdrDduky1t8KWB+OnTyGezmDeBxgm2hGc\r\ne/WhJQKDzX9CtvxaqNes7axSTkW/B6YsIpPnhZob7JruhsQBLic/VaWQ1XTI\r\nC7eX8ChpfTPp6fXYTlyTngCQbAwY+RgDvfcx9RL7EKgQaFsOnVHlaT3pKT/y\r\nUuejVw6Wc6J2Mm3F436eyVuweovse16/azs=\r\n=pzPK\r\n-----END PGP SIGNATURE-----\r\n","size":2684,"noattachment":false,"key":"/@whatwg-node/events/-/@whatwg-node/events-0.0.3-rc-20230423082701-935af9d.tgz"},"_npmUser":{"name":"ardatan","email":"ardatanrikulu@gmail.com"},"directories":{},"maintainers":[{"name":"ardatan","email":"ardatanrikulu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/events_0.0.3-rc-20230423082701-935af9d_1682238444162_0.4819243790582748"},"_hasShrinkwrap":false,"publish_time":1682238444313,"_cnpm_publish_time":1682238444313,"dist-tags":{"alpha":"0.2.0-alpha-20260921120829-953be1ba805992730bb868e06f5473882a24b2e8","latest":"0.1.2","rc":"0.1.2-rc-20240729093557-94eba750aa6126090cf8d833ab33eb8e70699369"}}