{"name":"nanoevents","version":"9.0.0","description":"Simple and tiny (107 bytes) event emitter library","keywords":["EventEmitter","Events","emit","emitter","event","pub/sub","publish","reactor","subscribe"],"author":{"name":"Andrey Sitnik","email":"andrey@sitnik.ru"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ai/nanoevents.git"},"engines":{"node":"^18.0.0 || >=20.0.0"},"sideEffects":false,"type":"module","types":"./index.d.ts","exports":{".":"./index.js","./package.json":"./package.json"},"_id":"nanoevents@9.0.0","gitHead":"6fe5741a60967d3c87cdedf5bfc7789abad2adce","bugs":{"url":"https://github.com/ai/nanoevents/issues"},"homepage":"https://github.com/ai/nanoevents#readme","_nodeVersion":"21.2.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-X8pU7IOpgKXVLPxYUI55ymXc8XuBE+uypfEyEFBtHkD1EX9KavYTVc+vXZHFyHKzA1TaZoVDqklLdQBBrxIuAw==","shasum":"c44fa7dde1615ac092023d5c881a3ee0b0a8c8fd","tarball":"http://registry-npm.ywwl.com/nanoevents/download/nanoevents-9.0.0.tgz","fileCount":5,"unpackedSize":4769,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQ34+6l1BmBE813i8bEkCd67gwlSu0dA4OyWwPSuljnAiEAqN8GazrFRO164hs9rBPiHutZl1kQYIdFjXbADiYhjcY="}],"size":2383,"noattachment":false,"key":"/nanoevents/-/nanoevents-9.0.0.tgz"},"_npmUser":{"name":"ai","email":"andrey@sitnik.ru"},"directories":{},"maintainers":[{"name":"ai","email":"andrey@sitnik.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nanoevents_9.0.0_1700719253943_0.7778647498703879"},"_hasShrinkwrap":false,"readme":"# Nano Events\n\nSimple and tiny event emitter library for JavaScript.\n\n* Only **107 bytes** (minified and brotlied).\n  It uses [Size Limit] to control size.\n* The `on` method returns `unbind` function. You don’t need to save\n  callback to variable for `removeListener`.\n* TypeScript and ES modules support.\n* No aliases, just `emit` and `on` methods.\n  No Node.js [EventEmitter] compatibility.\n\n```js\nimport { createNanoEvents } from 'nanoevents'\n\nconst emitter = createNanoEvents()\n\nconst unbind = emitter.on('tick', volume => {\n  summary += volume\n})\n\nemitter.emit('tick', 2)\nsummary //=> 2\n\nunbind()\nemitter.emit('tick', 2)\nsummary //=> 2\n```\n\n[EventEmitter]: https://nodejs.org/api/events.html\n[Size Limit]:   https://github.com/ai/size-limit\n\n<a href=\"https://evilmartians.com/?utm_source=nanoevents\">\n  <img src=\"https://evilmartians.com/badges/sponsored-by-evil-martians.svg\"\n       alt=\"Sponsored by Evil Martians\" width=\"236\" height=\"54\">\n</a>\n\n\n## Docs\nRead full docs **[here](https://github.com/ai/nanoevents#readme)**.\n","publish_time":1700719254105,"_cnpm_publish_time":1700719254105,"dist-tags":{"latest":"10.0.0"}}