{"_id":"@dakinfosystems/events","_rev":"3-215fcbaf781cca8e01e78aab0b9578b4","name":"@dakinfosystems/events","dist-tags":{"latest":"2.0.4"},"versions":{"2.0.0":{"name":"@dakinfosystems/events","version":"2.0.0","keywords":["eventjs"],"author":{"name":"Pramod Jain"},"license":"MIT","_id":"@dakinfosystems/events@2.0.0","maintainers":[{"name":"dak.infosystems","email":"dak.infosystems@gmail.com"},{"name":"pramodaug17","email":"pramod.aug.17@gmail.com"}],"homepage":"https://github.com/pramodaug17/eventJS#readme","bugs":{"url":"https://github.com/pramodaug17/eventJS/issues"},"dist":{"shasum":"22a9722016e678e68a19763dda82c110e697ecf3","tarball":"https://registry.npmjs.org/@dakinfosystems/events/-/events-2.0.0.tgz","fileCount":4,"integrity":"sha512-z1c6ov7wjXZ6Iw3oUB0RPCES+XODDbqdlxpdJrHDKHYyr2xemUqN9hqGFC2KmSK1bWGq9F7zGrUHxolCeFwghA==","signatures":[{"sig":"MEQCIBNpvj+upuAo1w+6Yi4g2tS9Pu0ycfr9RxJhWaYM6PBzAiAVs2zY5RIUexkmDmS5GGH8CTZDWZOM59Cet6DhM+lhFg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5740},"main":"dist/events.js","type":"module","types":"dist/@types/index.d.ts","unpkg":"dist/events.js","module":"dist/index.js","exports":{"types":"./dist/@types/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"5de97bf5884a1e1fb52b80bdc9ec7f56da3a88d2","scripts":{"test":"pnpm run test:vitest","build":"pnpm run build:tsup && pnpm run build:types","clean":"shx rm -rf dist/*","test:gh":"npm run test:vitest","build:gh":"npm run build:tsup && npm run build:types","build:tsup":"tsup && shx mv dist/index.global.js dist/events.js && shx mv dist/index.global.js.map dist/events.js.map","test:karma":"karma start --single-run --browsers ChromeHeadless karma.conf.js","build:types":"tsc -p tsconfig.types.json","start:karma":"karma start --no-single-run --browsers ChromeHeadless,FirefoxHeadless karma.conf.js","test:vitest":"vitest run","test:karmawatch":"karma start --auto-watch --no-single-run --browsers ChromeHeadless,FirefoxHeadless karma.conf.js"},"_npmUser":{"name":"pramodaug17","email":"pramod.aug.17@gmail.com"},"jsdelivr":"dist/events.js","repository":{"url":"git+https://github.com/pramodaug17/eventJS.git","type":"git"},"_npmVersion":"11.12.1","description":"eventJS enables script to emit event so that subscriber of that event will be notified.","directories":{},"sideEffects":false,"_nodeVersion":"24.15.0","_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","chai":"^6.2.2","tsup":"^8.5.1","jsdom":"^29.0.2","karma":"^6.4.4","mocha":"^11.7.5","vitest":"^4.1.5","esbuild":"^0.28.0","fancy-log":"^2.0.0","karma-chai":"^0.1.0","typescript":"^6.0.3","karma-mocha":"^2.0.1","karma-esbuild":"^2.3.0","@vitest/coverage-v8":"^4.1.5","karma-chrome-launcher":"^3.2.0","karma-firefox-launcher":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/events_2.0.0_1777409074570_0.32584961837417215","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@dakinfosystems/events","version":"2.0.1","keywords":["eventjs"],"author":{"name":"Pramod Jain"},"license":"MIT","_id":"@dakinfosystems/events@2.0.1","maintainers":[{"name":"dak.infosystems","email":"dak.infosystems@gmail.com"},{"name":"pramodaug17","email":"pramod.aug.17@gmail.com"}],"homepage":"https://github.com/pramodaug17/eventJS#readme","bugs":{"url":"https://github.com/pramodaug17/eventJS/issues"},"dist":{"shasum":"40e9ebb24bb49703c176b1f981206e59b922b948","tarball":"https://registry.npmjs.org/@dakinfosystems/events/-/events-2.0.1.tgz","fileCount":20,"integrity":"sha512-qgc+iJ5nbghOiPXTDyaPZe/FpeARHd90kfTrKsQjHsHb0eMSnERt74rKAsFq9O69SPcsKSKtRO97LSpAb+/W9A==","signatures":[{"sig":"MEQCIC0xsNU4GcJfav60KWBuPBVYuZ1R6Gnly8YfKdciWVoDAiBqnxOY6ccsmmhkD8PGVDj01Iym/0KyAzKNNTQMAxnc1w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":109753},"main":"dist/events.js","type":"module","types":"dist/@types/index.d.ts","unpkg":"dist/events.js","module":"dist/index.js","exports":{"types":"./dist/@types/index.d.ts","import":"./dist/index.js","default":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"e7d3530c77c5547e2ac09389293a1a3b1ac2d6d0","scripts":{"test":"pnpm run test:vitest","build":"pnpm run build:tsup && pnpm run build:types","clean":"shx rm -rf dist/*","test:gh":"npm run test:vitest","build:gh":"npm run build:tsup && npm run build:types","build:tsup":"tsup && shx mv dist/index.global.js dist/events.js && shx mv dist/index.global.js.map dist/events.js.map","test:karma":"karma start --single-run --browsers ChromeHeadless karma.conf.js","build:types":"tsc -p tsconfig.types.json","start:karma":"karma start --no-single-run --browsers ChromeHeadless,FirefoxHeadless karma.conf.js","test:vitest":"vitest run","test:karmawatch":"karma start --auto-watch --no-single-run --browsers ChromeHeadless,FirefoxHeadless karma.conf.js"},"_npmUser":{"name":"pramodaug17","email":"pramod.aug.17@gmail.com"},"jsdelivr":"dist/events.js","repository":{"url":"git+https://github.com/pramodaug17/eventJS.git","type":"git"},"_npmVersion":"11.12.1","description":"eventJS enables script to emit event so that subscriber of that event will be notified.","directories":{},"sideEffects":false,"_nodeVersion":"24.15.0","_hasShrinkwrap":false,"devDependencies":{"shx":"^0.4.0","chai":"^6.2.2","tsup":"^8.5.1","jsdom":"^29.0.2","karma":"^6.4.4","mocha":"^11.7.5","vitest":"^4.1.5","esbuild":"^0.28.0","fancy-log":"^2.0.0","karma-chai":"^0.1.0","typescript":"^6.0.3","karma-mocha":"^2.0.1","karma-esbuild":"^2.3.0","@vitest/coverage-v8":"^4.1.5","karma-chrome-launcher":"^3.2.0","karma-firefox-launcher":"^2.1.3"},"_npmOperationalInternal":{"tmp":"tmp/events_2.0.1_1777410477371_0.681022141603727","host":"s3://npm-registry-packages-npm-production"}},"2.0.4":{"name":"@dakinfosystems/events","version":"2.0.4","description":"eventJS enables script to emit event so that subscriber of that event will be notified.","type":"module","main":"dist/events.js","module":"dist/index.js","types":"dist/@types/index.d.ts","unpkg":"dist/events.js","jsdelivr":"dist/events.js","exports":{"types":"./dist/@types/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs","default":"./dist/index.js"},"sideEffects":false,"scripts":{"test:vitest":"vitest run","test":"pnpm run test:vitest","test:gh":"npm run test:vitest","build:tsup":"tsup && shx mv dist/index.global.js dist/events.js && shx mv dist/index.global.js.map dist/events.js.map","build:types":"tsc -p tsconfig.types.json","build":"pnpm run build:tsup && pnpm run build:types","build:gh":"npm run build:tsup && npm run build:types","clean":"shx rm -rf dist/*","start:karma":"karma start --no-single-run --browsers ChromeHeadless,FirefoxHeadless karma.conf.js","test:karma":"karma start --single-run --browsers ChromeHeadless karma.conf.js","test:karmawatch":"karma start --auto-watch --no-single-run --browsers ChromeHeadless,FirefoxHeadless karma.conf.js"},"repository":{"type":"git","url":"git+https://github.com/pramodaug17/eventJS.git"},"keywords":["eventjs"],"author":{"name":"Pramod Jain"},"license":"MIT","bugs":{"url":"https://github.com/pramodaug17/eventJS/issues"},"homepage":"https://github.com/pramodaug17/eventJS#readme","devDependencies":{"@vitest/coverage-v8":"^4.1.5","chai":"^6.2.2","esbuild":"^0.28.0","fancy-log":"^2.0.0","jsdom":"^29.0.2","karma":"^6.4.4","karma-chai":"^0.1.0","karma-chrome-launcher":"^3.2.0","karma-esbuild":"^2.3.0","karma-firefox-launcher":"^2.1.3","karma-mocha":"^2.0.1","mocha":"^11.7.5","shx":"^0.4.0","tsup":"^8.5.1","typescript":"^6.0.3","vitest":"^4.1.5"},"gitHead":"d157b202cd0188109866a1851dc9239c9238b983","_id":"@dakinfosystems/events@2.0.4","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-YHAMRSFaxgQVD1iq0/Z6jxhMsef0jQIWHn6CMSgLfunNWw2n4TMXKopG4IgknMmIe+3TDlLBT1HKY/2MaYC5pQ==","shasum":"16d104e7a10a14849155afcb46f9fe6cf5350d13","tarball":"https://registry.npmjs.org/@dakinfosystems/events/-/events-2.0.4.tgz","fileCount":20,"unpackedSize":105719,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dakinfosystems%2fevents@2.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICbaD6aF0JuAoiaGL685BWWEgkXIdJHjk2yLg6M6UuMJAiEA9NriYk0evwiMojIv0hA3qHhkWvQOw1JeA+3RDMkGXjQ="}]},"_npmUser":{"name":"pramodaug17","email":"pramod.aug.17@gmail.com"},"directories":{},"maintainers":[{"name":"dak.infosystems","email":"dak.infosystems@gmail.com"},{"name":"pramodaug17","email":"pramod.aug.17@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/events_2.0.4_1777446412441_0.17440555421727555"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-28T20:44:34.468Z","modified":"2026-04-29T07:06:53.261Z","2.0.0":"2026-04-28T20:44:34.702Z","2.0.1":"2026-04-28T21:07:57.504Z","2.0.4":"2026-04-29T07:06:52.625Z"},"bugs":{"url":"https://github.com/pramodaug17/eventJS/issues"},"author":{"name":"Pramod Jain"},"license":"MIT","homepage":"https://github.com/pramodaug17/eventJS#readme","keywords":["eventjs"],"repository":{"type":"git","url":"git+https://github.com/pramodaug17/eventJS.git"},"description":"eventJS enables script to emit event so that subscriber of that event will be notified.","maintainers":[{"name":"dak.infosystems","email":"dak.infosystems@gmail.com"},{"name":"pramodaug17","email":"pramod.aug.17@gmail.com"}],"readme":"# 📦 EventJS\n\n<p align=\"center\">\n  <b>Modern, extensible, async-capable event system</b><br/>\n  <i>Built for performance, scalability, and flexibility</i>\n</p>\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/npm/v/eventjs-core.svg\" />\n  <img src=\"https://img.shields.io/npm/dm/eventjs-core.svg\" />\n  <img src=\"https://img.shields.io/github/actions/workflow/status/pramodaug17/eventJS/ci.yml\" />\n  <img src=\"https://img.shields.io/github/license/pramodaug17/eventJS\" />\n  <img src=\"https://img.shields.io/bundlephobia/minzip/eventjs-core\" />\n</p>\n\n---\n\n## 🚀 Why EventJS?\n\nMost event emitters are:\n\n- synchronous ❌  \n- non-extensible ❌  \n- lack scheduling ❌  \n\n**EventJS solves that** by combining:\n\n- ⚡ Async + non-blocking execution\n- 🧠 Smart scheduling\n- 🔌 Middleware-style plugin system\n- 📦 Batch processing\n- 🎯 Predictable architecture\n\n---\n\n## ✨ Features\n\n- Sync emit + async execution\n- Microtask / macrotask / idle scheduling\n- Plugin hooks (before/after emit & listener)\n- Parallel & sequential dispatch\n- Once listeners\n- Strict mode validation\n- Non-blocking queue\n- TypeScript support\n\n---\n\n## 📥 Installation\n\n```bash\nnpm install @dakinfosystems/events\n```\n\n---\n\n## 🧑‍💻 Quick Example\n\n```js\nimport { EventEmitter } from \"@dakinfosystems/events\";\n\nconst emitter = new EventEmitter();\n\nemitter.registerEvent(\"greet\");\n\nemitter.on(\"greet\", (name) => {\n  console.log(\"Hello\", name);\n});\n\nemitter.emit(\"greet\", \"World\");\n```\n\n---\n\n## 🔌 Plugin Example\n\n```js\nemitter.use({\n  name: \"logger\",\n\n  beforeEmit(ctx) {\n    console.log(\"[Emit]\", ctx.eventName);\n  },\n\n  afterListener(ctx) {\n    console.log(\"[Done]\");\n  }\n});\n```\n\n---\n\n## 🧠 Architecture\n\n```\nemit()\n ├── validation (sync)\n ├── beforeEmit (plugins)\n ├── queue\n ├── scheduler\n ├── dispatcher\n │    ├── beforeListener\n │    ├── handler\n │    ├── afterListener\n └── afterEmit\n```\n\n---\n\n## ⚙️ Configuration\n\n```js\nnew EventEmitter({\n  strictMode: true,\n  asyncMode: true,\n  strategy: \"microtask\",\n  batch: false\n});\n```\n\n---\n\n## 🌐 CDN\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/@dakinfosystems/events@latest/dist/events.js\"></script>\n```\n\n---\n\n## 🧪 Testing\n\n```bash\npnpm test\n```\n\n---\n\n## 📦 Build\n\n```bash\npnpm build\n```\n\n---\n\n## 🤝 Contributing\n\nPRs welcome. Please include tests.\n\n---\n\n## 📄 License\n\nMIT\n","readmeFilename":"README.md"}