{"_id":"@angx-o/dispatcher","_rev":"2-3301ed89718582f3e27a1a6cb3924459","name":"@angx-o/dispatcher","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@angx-o/dispatcher","version":"1.0.0","description":"a middleware dispatcher.","main":"./dist/main.js","module":"./dist/main.mjs","types":"./dist/main.d.ts","scripts":{"lint":"biome lint --apply ./lib","format":"biome check --apply ./lib","build":"tsup"},"keywords":["dispatcher","middleware"],"repository":{"type":"git","url":"git://github.com/khawa-angx/dispatcher.git","web":"https://github.com/khawa-angx/dispatcher"},"bugs":{"url":"https://github.com/khawa-angx/dispatcher/issues/"},"author":{"name":"Angx"},"license":"MIT","devDependencies":{"@biomejs/biome":"^1.5.3","tsup":"^8.0.2","typescript":"^5.3.3"},"_id":"@angx-o/dispatcher@1.0.0","gitHead":"523c20a44835fe9a0603c6efd8aa67754e477ed8","homepage":"https://github.com/khawa-angx/dispatcher#readme","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-x5wnUmtRXu/V3DxjY3LBYc9aCB1mJ+bCcwXD2ScTf9jkVombqQnxxeJQc/PzNEYvsFGChEfrv4O2uuvCuAkmLA==","shasum":"ab5fe6a3d20caefae3f16a87d949cb8b7aa44dd1","tarball":"https://registry.npmjs.org/@angx-o/dispatcher/-/dispatcher-1.0.0.tgz","fileCount":9,"unpackedSize":3840,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBmsAaocU23w5Us8WPuW/Ms30xBQQod8kgUoL1ypW/enAiEAzDQ32Amw2dENMf/zdMvBZX39+o6tXCdQEmf/CB5/6gQ="}]},"_npmUser":{"name":"angx-o","email":"2822213795@qq.com"},"directories":{},"maintainers":[{"name":"angx-o","email":"2822213795@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dispatcher_1.0.0_1708685695901_0.8888080266408305"},"_hasShrinkwrap":false},"1.0.1":{"name":"@angx-o/dispatcher","version":"1.0.1","description":"a middleware dispatcher.","main":"./dist/main.js","module":"./dist/main.mjs","types":"./dist/main.d.ts","scripts":{"lint":"biome lint --apply ./lib","format":"biome check --apply ./lib","build":"tsup"},"keywords":["dispatcher","middleware"],"repository":{"type":"git","url":"git://github.com/khawa-angx/dispatcher.git","web":"https://github.com/khawa-angx/dispatcher"},"bugs":{"url":"https://github.com/khawa-angx/dispatcher/issues/"},"author":{"name":"Angx"},"license":"MIT","devDependencies":{"@biomejs/biome":"^1.5.3","tsup":"^8.0.2","typescript":"^5.3.3"},"_id":"@angx-o/dispatcher@1.0.1","gitHead":"bccc3c13ca0a3d8d3623d4fdb524dcb062e8b36d","homepage":"https://github.com/khawa-angx/dispatcher#readme","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-0fEQT4f2nBzEcwoS5lgn76KjmoL1F9archhzKrjwQqXzyfqL2Egs+MF+iDDlzDSBaIMOlzLeikwx7mYuhWBcXg==","shasum":"21dea216c0638b84539124ad4b2f19471655202e","tarball":"https://registry.npmjs.org/@angx-o/dispatcher/-/dispatcher-1.0.1.tgz","fileCount":9,"unpackedSize":3827,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBnmjTLMFoJdUxzj5h14KAHlSXzx0IVsxuork53a/ogYAiEAk1iegXBHa/Lp1Uc68yAA0l2zhSzQivyFleQvq9TiJZg="}]},"_npmUser":{"name":"angx-o","email":"2822213795@qq.com"},"directories":{},"maintainers":[{"name":"angx-o","email":"2822213795@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dispatcher_1.0.1_1708685799301_0.698311219477536"},"_hasShrinkwrap":false},"1.0.2":{"name":"@angx-o/dispatcher","version":"1.0.2","description":"a middleware dispatcher.","main":"./dist/main.js","module":"./dist/main.mjs","types":"./dist/main.d.ts","scripts":{"lint":"biome lint --apply ./lib","format":"biome check --apply ./lib","build":"tsup"},"keywords":["dispatcher","middleware"],"repository":{"type":"git","url":"git://github.com/khawa-angx/dispatcher.git","web":"https://github.com/khawa-angx/dispatcher"},"bugs":{"url":"https://github.com/khawa-angx/dispatcher/issues/"},"author":{"name":"Angx"},"license":"MIT","devDependencies":{"@biomejs/biome":"^1.5.3","tsup":"^8.0.2","typescript":"^5.3.3"},"_id":"@angx-o/dispatcher@1.0.2","gitHead":"8d49cc524a62e3df4c51546c81e195a4cc780331","homepage":"https://github.com/khawa-angx/dispatcher#readme","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-7ALlGQAwdVvhJWrV2crRD9T9AHT5AQvkRbfWclak4Ct/mNBz2vfncZ7QePOonhcFdvdaCbo5sWTDQUjSdgywuQ==","shasum":"728fd9e5f2c6c718ff8a6e329852482dea9ee211","tarball":"https://registry.npmjs.org/@angx-o/dispatcher/-/dispatcher-1.0.2.tgz","fileCount":13,"unpackedSize":7271,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcf5ANTLctpbqYuADq6FXbJJUhmrisAugVtq7otDhWIwIgVCOknPPUXRqDFtiMbQqjSv0Oi93szGCFu54bbPiK1rQ="}]},"_npmUser":{"name":"angx-o","email":"2822213795@qq.com"},"directories":{},"maintainers":[{"name":"angx-o","email":"2822213795@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dispatcher_1.0.2_1708685989579_0.2804302048821601"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-23T10:54:55.817Z","1.0.0":"2024-02-23T10:54:56.046Z","modified":"2024-02-23T10:59:50.151Z","1.0.1":"2024-02-23T10:56:39.439Z","1.0.2":"2024-02-23T10:59:49.760Z"},"maintainers":[{"name":"angx-o","email":"2822213795@qq.com"}],"description":"a middleware dispatcher.","homepage":"https://github.com/khawa-angx/dispatcher#readme","keywords":["dispatcher","middleware"],"repository":{"type":"git","url":"git://github.com/khawa-angx/dispatcher.git","web":"https://github.com/khawa-angx/dispatcher"},"author":{"name":"Angx"},"bugs":{"url":"https://github.com/khawa-angx/dispatcher/issues/"},"license":"MIT","readme":"\na simple middleware dispatcher\n\n```ts\n\nimport { Dispatcher } from \"@angx-o/dispatcher\"\n\nconst dispatcher = new Dispatcher();\n\ndispatcher.use(\n  async (next) => {\n    console.log(1);\n    await next();\n    console.log(2);\n  },\n    console.log(3);\n    await next();\n    console.log(4);\n  }\n)\n\ndispatcher\n  .dispatch(async () => {\n    console.log(5)\n  })\n  .then(() => {\n    console.log(6)\n  })\n\n// output 1 3 5 4 2 6\n```","readmeFilename":"README.md"}