{"_id":"@mary-ext/simple-event-emitter","_rev":"4-71ca90b898995878d8eb45c4548fdeed","name":"@mary-ext/simple-event-emitter","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@mary-ext/simple-event-emitter","version":"1.0.0","license":"BSD-3-Clause","_id":"@mary-ext/simple-event-emitter@1.0.0","maintainers":[{"name":"externdefs","email":"hi@mary.my.id"}],"dist":{"shasum":"ec48a2420c28da650811ebe990f56fdafb864738","tarball":"https://registry.npmjs.org/@mary-ext/simple-event-emitter/-/simple-event-emitter-1.0.0.tgz","fileCount":7,"integrity":"sha512-meA/zJZKIN1RVBNEYIbjufkUrW7/tRjHH60FjolpG1ixJKo76TB208qefQLNdOVDA7uIG0CGEDuhmMirtHKLAg==","signatures":[{"sig":"MEUCIQDjfzkW+Lrf6bqpoOdG9p1vjwMUOVZF12S9Bi4vaywragIgITywL8iM1c6TK6e68vro3HW5e0JJ+Tjo/AcjLG0Uu/4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7527},"type":"module","shasum":"ec48a2420c28da650811ebe990f56fdafb864738","exports":{".":"./dist/index.js"},"scripts":{"fmt":"prettier --cache --write .","build":"tsc --project tsconfig.build.json","prepack":"rm -rf dist; bun run build"},"_npmUser":{"name":"externdefs","email":"hi@mary.my.id"},"_integrity":"sha512-meA/zJZKIN1RVBNEYIbjufkUrW7/tRjHH60FjolpG1ixJKo76TB208qefQLNdOVDA7uIG0CGEDuhmMirtHKLAg==","repository":{"url":"https://codeberg.org/mary-ext/npm-simple-event-emitter"},"_npmVersion":"10.8.3","description":"A really simple event emitter","directories":{},"_nodeVersion":"22.6.0","_hasShrinkwrap":false,"devDependencies":{"prettier":"^3.5.3","typescript":"~5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/simple-event-emitter_1.0.0_1746970531967_0.11868514017161935","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@mary-ext/simple-event-emitter","version":"1.0.1","license":"BSD-3-Clause","_id":"@mary-ext/simple-event-emitter@1.0.1","maintainers":[{"name":"externdefs","email":"hi@mary.my.id"}],"dist":{"shasum":"c0627867f3c83f94ec4b2a34306d1a6750258274","tarball":"https://registry.npmjs.org/@mary-ext/simple-event-emitter/-/simple-event-emitter-1.0.1.tgz","fileCount":7,"integrity":"sha512-9+VvZisxZ/gSg+JJH7hmXaA8Qj42Qjz3O58RSB+INYc8iLA0icATZxHB9vKbj59ojDGZjO3hCKzMXocx3L0H8w==","signatures":[{"sig":"MEQCIDV0JjHAkZhIqKNlpD1yPVLCfGXXgA0CksgBq9pv9OJ5AiAQ0v5H+6XxIEnYIjDv29OZNHXuaU/JViBC2j/seugiFg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7621},"type":"module","_from":"file:mary-ext-simple-event-emitter-1.0.1.tgz","exports":{".":"./dist/index.js"},"scripts":{"fmt":"oxfmt","lint":"oxlint","build":"tsc --project tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"externdefs","email":"hi@mary.my.id"},"_resolved":"/tmp/feb7f20480125235754cba7311e4cfd3/mary-ext-simple-event-emitter-1.0.1.tgz","_integrity":"sha512-9+VvZisxZ/gSg+JJH7hmXaA8Qj42Qjz3O58RSB+INYc8iLA0icATZxHB9vKbj59ojDGZjO3hCKzMXocx3L0H8w==","repository":{"url":"https://codeberg.org/mary-ext/npm-simple-event-emitter"},"_npmVersion":"11.9.0","description":"A really simple event emitter","directories":{},"_nodeVersion":"25.6.1","_hasShrinkwrap":false,"devDependencies":{"bumpp":"^10.4.1","oxfmt":"^0.34.0","oxlint":"^1.49.0","typescript":"~5.8.3"},"_npmOperationalInternal":{"tmp":"tmp/simple-event-emitter_1.0.1_1771665966057_0.8684913482056908","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@mary-ext/simple-event-emitter","version":"1.0.2","license":"0BSD","_id":"@mary-ext/simple-event-emitter@1.0.2","maintainers":[{"name":"externdefs","email":"hi@mary.my.id"}],"dist":{"shasum":"f43b05760075c2cad4d98005f92a3f9d15cb3a15","tarball":"https://registry.npmjs.org/@mary-ext/simple-event-emitter/-/simple-event-emitter-1.0.2.tgz","fileCount":8,"integrity":"sha512-A644JdOf+KfTGyX/EYf8AI1Y18mM7369KrhtOVkdEwRa2QIC0Botv7XWnK6/XU7HuQfvtFpCufmHJC3hi4YMuw==","signatures":[{"sig":"MEUCIHdMJYefOtZFR/yMfHSMmLvltmluOht9p4OtfzmWMjn+AiEAysX5pvRJyAEmX2QonyLvFh+i6/I2BBS2mtQTYj2TmlI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8695},"type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"dev":"tsdown --watch","fmt":"oxfmt","lint":"oxlint","build":"oxlint && tsdown"},"_npmUser":{"name":"externdefs","email":"hi@mary.my.id"},"repository":{"url":"https://codeberg.org/mary-ext/npm-simple-event-emitter","type":"git"},"description":"a simple typed event emitter","directories":{},"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"bumpp":"^11.1.0","oxfmt":"^0.55.0","oxlint":"^1.70.0","tsdown":"^0.22.3","typescript":"^6.0.3","@types/node":"^25.9.4","oxlint-tsgolint":"^0.23.0"},"_npmOperationalInternal":{"tmp":"tmp/simple-event-emitter_1.0.2_1781964123438_0.11729000407429901","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"_id":"@mary-ext/simple-event-emitter@1.1.0","dist":{"shasum":"c13ea17cf8b4b5ecd57b2a124705bce7f3ad0c4b","tarball":"https://registry.npmjs.org/@mary-ext/simple-event-emitter/-/simple-event-emitter-1.1.0.tgz","fileCount":11,"integrity":"sha512-Tx5raGtZ0n3f42+04rDt0G6n008g5FwxPQIkZcsMSkKB2dNTQnRkvk/iaa59khud71Ckiz1pH9HPetGO7w/Xaw==","signatures":[{"sig":"MEUCIAPmC+QvyNkCNO4bh8rdMIAUbBzkYR3VGIKKIANGJvggAiEA7c2Chjh9Tkpm3SGuA0wWxUFd1IeEIUgYN9xNWRIDge0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDBMOrcerWgprqzGRQnE+DVShNDfLK/0qV/DvDoWRUr3wIgbzBHe2k8V306a7fVlseMS9JSqA0sBOHrWOKTekrKlGA="}],"unpackedSize":26211},"name":"@mary-ext/simple-event-emitter","type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"license":"0BSD","scripts":{"dev":"tsdown --watch","build":"tsdown"},"version":"1.1.0","_npmUser":{"name":"externdefs","email":"hi@mary.my.id"},"repository":{"url":"https://tangled.org/did:plc:vphcbdoyzfk4yypttdznslp7","type":"git","directory":"packages/simple-event-emitter"},"description":"a simple typed event emitter","directories":{},"maintainers":[{"name":"externdefs","email":"hi@mary.my.id"}],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/simple-event-emitter_1.1.0_1791590183212_0.18100036499367977"}}},"time":{"created":"2025-05-11T13:35:31.851Z","modified":"2026-10-09T23:56:23.462Z","1.0.0":"2025-05-11T13:35:32.170Z","1.0.1":"2026-02-21T09:26:06.205Z","1.0.2":"2026-06-20T14:02:03.580Z","1.1.0":"2026-10-09T23:56:23.290Z"},"license":"0BSD","repository":{"url":"https://tangled.org/did:plc:vphcbdoyzfk4yypttdznslp7","type":"git","directory":"packages/simple-event-emitter"},"description":"a simple typed event emitter","maintainers":[{"name":"externdefs","email":"hi@mary.my.id"}],"readme":"# simple-event-emitter\n\na simple typed event emitter\n\n```ts\ntype UserStatus = 'online' | 'away' | 'offline';\n\nconst userStatusChanged = new SimpleEventEmitter<[username: string, status: UserStatus]>();\n\nconst cleanup = userStatusChanged.subscribe((username, status) => {\n\tconsole.log(`@${username} is now ${status}`);\n});\n\nuserStatusChanged.emit('mary', 'offline');\n```\n\n`KeyedEventEmitter` carries several named events on one emitter:\n\n```ts\nconst todos = new KeyedEventEmitter<{\n\tadd: [text: string];\n\tclear: [];\n}>();\n\nconst cleanup = todos.subscribe('add', (text) => {\n\tconsole.log(`added ${text}`);\n});\n\ntodos.emit('add', 'water the plants');\n```\n","readmeFilename":""}