{"_id":"@yume-chan/async","_rev":"10-5fc88b30296a6db1634b02bb94ed426a","name":"@yume-chan/async","dist-tags":{"latest":"4.1.3"},"versions":{"2.1.4":{"name":"@yume-chan/async","version":"2.1.4","keywords":["async","util"],"author":{"url":"https://chensi.moe/blog","name":"Simon Chan","email":"cnsimonchan@live.com"},"license":"MIT","_id":"@yume-chan/async@2.1.4","maintainers":[{"name":"yume-chan","email":"cnsimonchan@live.com"}],"homepage":"https://github.com/yume-chan/async#readme","bugs":{"url":"https://github.com/yume-chan/async/issues"},"dist":{"shasum":"ace782070678ef2e0e47fa56c11cc47f490aa31e","tarball":"https://registry.npmjs.org/@yume-chan/async/-/async-2.1.4.tgz","fileCount":27,"integrity":"sha512-dfzxt6iV7G3m+XEIHJH0eNBjh0bxI0pduRCGpA+dR1u38l7U87GpnGm2Vq1/Na+C1ZWod6mJMRoDECLKjWYXEg==","signatures":[{"sig":"MEYCIQDHNl9Lzm4Pa2PC62ga7cZuPkKVZE8GirmECgNPVO6y7AIhAPuOGn0WV0RtaymWhjfvvKN7aDiC1Z/qTvDp1ULLX04P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgE3JuCRA9TVsSAnZWagAA/3cP/jxNxU388fWWosoK7t+C\nsnYYGv2hP70kmrWIGwhu7ngub42zQaBUJRcIqSkMFRsc7xd9ohSGxct/t4rC\n6n9MEiFv9+htGehCchKpQVjJKrDw5H3JQHqRWhFfSMeynGTifV9moW5hJ1k7\nxt47nVatGNFwU3Hqla7hvVMRirQhfJduTf73ZIPbcVxUSY7HJ3+SfeHokcEb\nXDDo5hIKKyLb9epIw6hQnT3dIsqRifhBCSoVXt6HZYpVk/PKsfo+6j+eXzWl\nN0dJsCGE9kxR+mrPdZNnPhkhbU2inxe94KCdN87LPhpHabyxyk0WiRP5U82O\n9UHMY4jrSDbVpv7erreBTNR+k4sPI5xIlYvaU/u6ZVlZEII2n9tunL0fY1Rm\nHL/Pru+4Xm7pacTZGkhi463wuK2VqLSa9strW3gIyIH5XKogAbYFuOgSzG0D\nwztOxCDgWBBOhwPCqbAJ7yGw8sEzJwMn3NXlZaO9OjhoCFo3to2TRvPBEADd\nRYv0et1Ct2GxynyvDxCtPjMVsAuI69PvUXTKEA/a4zVuwotgpLMrjCDQgom+\ngHd5xLYLmcKLRqUASp8DEiNgbLodNQ6RoVhw3uArGrKMywuYyrKrbMa6V2bq\ntkxEv+CjHkWnlQedmHaIghkXnefqGKo0c1gR/QNUgLmzTsbQYmqD0V5+654d\nv25x\r\n=awhQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"cjs/index.js","types":"dts/index.d.ts","module":"esm/index.js","gitHead":"26ebdb7f579d2556ec894fccff346a22ecd10103","scripts":{"test":"jest","build":"rimraf {cjs,esm,dts} && tsc -b tsconfig.esm.json tsconfig.cjs.json","coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"yume-chan","email":"cnsimonchan@live.com"},"repository":{"url":"git+https://github.com/yume-chan/async.git","type":"git"},"_npmVersion":"6.14.8","description":"Utils for async programming.","directories":{},"_nodeVersion":"14.14.0","dependencies":{"tslib":"2.0.3"},"_hasShrinkwrap":false,"devDependencies":{"jest":"26.6.3","rimraf":"3.0.2","ts-jest":"26.4.4","typescript":"4.1.3","@types/jest":"26.0.19"},"_npmOperationalInternal":{"tmp":"tmp/async_2.1.4_1611887214206_0.002530701223605325","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"@yume-chan/async","version":"2.2.0","keywords":["async","util"],"author":{"url":"https://chensi.moe/blog","name":"Simon Chan","email":"cnsimonchan@live.com"},"license":"MIT","_id":"@yume-chan/async@2.2.0","maintainers":[{"name":"yume-chan","email":"cnsimonchan@live.com"}],"homepage":"https://github.com/yume-chan/async#readme","bugs":{"url":"https://github.com/yume-chan/async/issues"},"dist":{"shasum":"cc7da6eeb60e2fc82e987ddaa8a52e90548f1ff2","tarball":"https://registry.npmjs.org/@yume-chan/async/-/async-2.2.0.tgz","fileCount":34,"integrity":"sha512-jatCtX1/3DsR9Vt3EB8CGFy0MNrXP5f+eNiRGHLH+LkYz7MPLzpqL/DnvXSip+Z0EKBCDnzuNuELjsKEEzcdQA==","signatures":[{"sig":"MEYCIQC6P5dNsIYtm24n2E1S4cQ/QfGTtknAPhQWL7hlLAEWBQIhAKPHn/T4wmfFz2pR3CjsOPLeOC+qtb8PDEfhUstSDYKf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipXkpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJ4RAAhyJNL/NoDUh5Pxm8OPw4RM4nLOG5yj7r6Lea+Y4+Z+98okRo\r\n4VSfi+5U4F8DbFvrYQ2+dHEYLLTcigMnKsChXexubNmDwsSnjptlC5jyqZJp\r\nLnKc8afhPBQEnVR4iG9ckCn5vIrXpn63PpQbeVULAWniD4YKUokRLf44n3Du\r\nYwSYKUUzSUmz+ybGaJBx3Psuj0SC9s6+9ZL/1ubHl67YN3aPJxIn1XXwQur8\r\n8ZEAuCV4tx3mLW15eRAHjTO8OF7sgh7agJ/RldoVrmWRFszuS3k3+KlcgwdX\r\n/9SNURcbDnXri0QMp1Z3PvzaVV4m82TzkIgbog9jc0sCXvBk1afYlEIzKKuZ\r\nWl7mZc3RkN3WFBgEE+gN6ESadX3zM7OE1//bQ+e0tDdwL0t0WbbfFx741ijB\r\nUO245Wofh0GAomE5UGsyupAzfaYTmKnL2O+2/u4j37okvY7lW/JAyhadZbZ9\r\n1TppFEt2L0FgDUqVDPFBKAel1ltjoEcd0BH0PXoNcV9d3kyqJPDgFrBnOM6W\r\nP3zzWgcGOp7pIhhBrLjDrYiUKH8h9MqcDXCJx+Prq/6FBq+a8d3KYtblkNsc\r\nqZE+6Vv5pyMdzOW1+FOqM/d3MZ9pux8q+fShw8UoOCg6NLzM4Cb38qqs1fo4\r\nPtfS91/cyfLvscIeC6yps9OAns8EFitJ4GU=\r\n=KQf7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"cjs/index.js","types":"dts/index.d.ts","module":"esm/index.js","gitHead":"bee452c9db8225e0a17cb53de470a529a8d7210d","scripts":{"test":"jest","build":"rimraf {cjs,esm,dts} && tsc -b tsconfig.esm.json tsconfig.cjs.json","coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"yume-chan","email":"cnsimonchan@live.com"},"repository":{"url":"git+https://github.com/yume-chan/async.git","type":"git"},"_npmVersion":"8.11.0","description":"Utils for async programming.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.0","rimraf":"3.0.2","ts-jest":"^28.0.2","typescript":"^4.7.2","@jest/globals":"^28.1.0"},"_npmOperationalInternal":{"tmp":"tmp/async_2.2.0_1655011625648_0.3949435852680234","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"@yume-chan/async","version":"4.0.0","keywords":["async","util"],"author":{"url":"https://chensi.moe/blog","name":"Simon Chan","email":"cnsimonchan@live.com"},"license":"MIT","_id":"@yume-chan/async@4.0.0","maintainers":[{"name":"yume-chan","email":"cnsimonchan@live.com"}],"homepage":"https://github.com/yume-chan/async#readme","bugs":{"url":"https://github.com/yume-chan/async/issues"},"dist":{"shasum":"d03715d50e200f8b3a7826ae614080cecd82126c","tarball":"https://registry.npmjs.org/@yume-chan/async/-/async-4.0.0.tgz","fileCount":36,"integrity":"sha512-T4DOnvaVqrx+PQh8bESdS6y2ozii7M0isJ5MpGU0girfz9kmwOaJ+rF1oeTJGZ0k+v92+eo/q6SpJjcjnO9tuQ==","signatures":[{"sig":"MEUCIEG1PoQDk9PKDiNHw5Lp1wHVUsSW2H8TY6o5eK2N9o9UAiEA7KBx4Ksa7xFcK/fVY6uxdkcxjL07V3H3469UDt2B2cs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23730},"main":"cjs/index.js","_from":"file:yume-chan-async-4.0.0.tgz","types":"dts/index.d.ts","module":"esm/index.js","scripts":{"test":"jest","build":"rimraf --glob {cjs,esm,dts} *.tsbuildinfo && tsc -b tsconfig.esm.json tsconfig.cjs.json","coverage":"jest --coverage"},"_npmUser":{"name":"yume-chan","email":"cnsimonchan@live.com"},"_resolved":"C:\\Users\\simon\\AppData\\Local\\Temp\\11e1197035de4b88cfde78a8a67028dd\\yume-chan-async-4.0.0.tgz","_integrity":"sha512-T4DOnvaVqrx+PQh8bESdS6y2ozii7M0isJ5MpGU0girfz9kmwOaJ+rF1oeTJGZ0k+v92+eo/q6SpJjcjnO9tuQ==","repository":{"url":"git+https://github.com/yume-chan/async.git","type":"git"},"_npmVersion":"10.8.1","description":"Utils for async programming.","directories":{},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"6.0.1","ts-jest":"^29.2.5","typescript":"^5.6.3","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/async_4.0.0_1729714852121_0.049080450131389064","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"@yume-chan/async","version":"4.0.1","keywords":["async","util"],"author":{"url":"https://chensi.moe/blog","name":"Simon Chan","email":"cnsimonchan@live.com"},"license":"MIT","_id":"@yume-chan/async@4.0.1","maintainers":[{"name":"yume-chan","email":"cnsimonchan@live.com"}],"homepage":"https://github.com/yume-chan/async#readme","bugs":{"url":"https://github.com/yume-chan/async/issues"},"dist":{"shasum":"e134a07bffd47cef4531e07811a046fbe2e483bb","tarball":"https://registry.npmjs.org/@yume-chan/async/-/async-4.0.1.tgz","fileCount":43,"integrity":"sha512-AqxC9XsepnFJRKqrh9gBgUr9BenxFzO1fCarzcIJXYMVfNyyMDmgynGHH2SHl4QiQE22XFFo80im0C1DFcRhKw==","signatures":[{"sig":"MEUCIEpwnCdwLWeXZN5C7BNwfHktBUNF76vwPOGWkMqVPBHfAiEAlP0SkimwPQ53pcmDglGatS16jcjEOGxaTMFaDpJNpLU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24926},"main":"cjs/index.js","types":"dts/index.d.ts","module":"esm/index.js","gitHead":"f8aaed9e781ef16fc1217603a167c6c29dc212f8","scripts":{"test":"jest","build":"rimraf --glob {cjs,esm,dts} *.tsbuildinfo && tsc -b tsconfig.esm.json tsconfig.cjs.json","coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"yume-chan","email":"cnsimonchan@live.com"},"repository":{"url":"git+https://github.com/yume-chan/async.git","type":"git"},"_npmVersion":"10.8.1","description":"Utils for async programming.","directories":{},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"6.0.1","ts-jest":"^29.2.5","typescript":"^5.6.3","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/async_4.0.1_1732054234728_0.22173692503131148","host":"s3://npm-registry-packages"}},"4.0.2":{"name":"@yume-chan/async","version":"4.0.2","keywords":["async","util"],"author":{"url":"https://chensi.moe/blog","name":"Simon Chan","email":"cnsimonchan@live.com"},"license":"MIT","_id":"@yume-chan/async@4.0.2","maintainers":[{"name":"yume-chan","email":"cnsimonchan@live.com"}],"homepage":"https://github.com/yume-chan/async#readme","bugs":{"url":"https://github.com/yume-chan/async/issues"},"dist":{"shasum":"f75f9934e150018a0df12614b93ee92d79a3de5a","tarball":"https://registry.npmjs.org/@yume-chan/async/-/async-4.0.2.tgz","fileCount":43,"integrity":"sha512-YP5Hg4DZoq6CXzeTsiOu6rDNUaWw8SMiM4cB2rHam4zRTatgUHCWpSKMawQt0+nUro/+IeNTZLh2QpIFyxuGzg==","signatures":[{"sig":"MEQCIFh+zJ5XsUdhSMOiquGFppB1qdVeWSeHPPeFBHgh+L+KAiATpXzZma7Uqr57WiAeo6WAs1o6VNrPs79ztconDh5IxA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25870},"main":"cjs/index.js","types":"dts/index.d.ts","module":"esm/index.js","gitHead":"fc420a465a19f310241f53fcc9aac6ded701f5e1","scripts":{"test":"jest","build":"rimraf --glob {cjs,esm,dts} *.tsbuildinfo && tsc -b tsconfig.esm.json tsconfig.cjs.json","coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"yume-chan","email":"cnsimonchan@live.com"},"repository":{"url":"git+https://github.com/yume-chan/async.git","type":"git"},"_npmVersion":"10.8.1","description":"Utils for async programming.","directories":{},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"6.0.1","ts-jest":"^29.2.5","typescript":"^5.6.3","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/async_4.0.2_1732055477181_0.41225149881333123","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"@yume-chan/async","version":"4.1.0","keywords":["async","util"],"author":{"url":"https://chensi.moe/blog","name":"Simon Chan","email":"cnsimonchan@live.com"},"license":"MIT","_id":"@yume-chan/async@4.1.0","maintainers":[{"name":"yume-chan","email":"cnsimonchan@live.com"}],"homepage":"https://github.com/yume-chan/async#readme","bugs":{"url":"https://github.com/yume-chan/async/issues"},"dist":{"shasum":"1c466efd5f718bfb218fea94f4b3089b5a71b009","tarball":"https://registry.npmjs.org/@yume-chan/async/-/async-4.1.0.tgz","fileCount":43,"integrity":"sha512-0xzs9QxeEogxBBiO4OtVb+C8LP5rhW0x1Uq5teu/uQ5h67GxhPt64QNlbldRZBqyHkPCUbxOSGFMEFTkvTjT0Q==","signatures":[{"sig":"MEUCIDn09eERFeZxosunAPglnuRieOnM2RWkTXEECP6DGA7kAiEA4eQ7dAn1p3yE6OUuSj4d6V1PMGiea8GuGbNXNr3HjEI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27587},"main":"cjs/index.js","types":"dts/index.d.ts","module":"esm/index.js","gitHead":"cb42dede55944b673d6fb98a0ac18725c0eb2d0c","scripts":{"test":"jest","build":"rimraf --glob {cjs,esm,dts} *.tsbuildinfo && tsc -b tsconfig.esm.json tsconfig.cjs.json","coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"yume-chan","email":"cnsimonchan@live.com"},"repository":{"url":"git+https://github.com/yume-chan/async.git","type":"git"},"_npmVersion":"10.9.2","description":"Utils for async programming.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"6.0.1","ts-jest":"^29.2.6","typescript":"^5.8.2","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/async_4.1.0_1742627717408_0.18553784919003213","host":"s3://npm-registry-packages-npm-production"}},"4.1.1":{"name":"@yume-chan/async","version":"4.1.1","keywords":["async","util"],"author":{"url":"https://chensi.moe/blog","name":"Simon Chan","email":"cnsimonchan@live.com"},"license":"MIT","_id":"@yume-chan/async@4.1.1","maintainers":[{"name":"yume-chan","email":"cnsimonchan@live.com"}],"homepage":"https://github.com/yume-chan/async#readme","bugs":{"url":"https://github.com/yume-chan/async/issues"},"dist":{"shasum":"334f5ab1ff61cffc8bb339c8c5709943c98bef44","tarball":"https://registry.npmjs.org/@yume-chan/async/-/async-4.1.1.tgz","fileCount":43,"integrity":"sha512-qNufiJnFrRAVjQKnyhD5BR3JalojkM74UcBL4caQe96UA8ixazNq1s2vV1WPPnKyAPiC+ZeBW0uEV3H2xmsNMA==","signatures":[{"sig":"MEQCIGGdLBhRdqjqJu+WQEFhSnYGkwq94x/HX0xdDGF9fTT/AiAslulxC4vNDrGl8wL0FUFdgOh/pLqD6OOW4J8D2oVHuw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26319},"main":"cjs/index.js","types":"dts/index.d.ts","module":"esm/index.js","exports":{"import":"./esm/index.js","require":"./cjs/index.js"},"gitHead":"d43990415add814f8d841ff141aa5b0df723ac1c","scripts":{"test":"jest","build":"rimraf --glob {cjs,esm,dts} *.tsbuildinfo && tsc -b tsconfig.esm.json tsconfig.cjs.json","coverage":"jest --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"yume-chan","email":"cnsimonchan@live.com"},"repository":{"url":"git+https://github.com/yume-chan/async.git","type":"git"},"_npmVersion":"10.9.2","description":"Utils for async programming.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"6.0.1","ts-jest":"^29.2.6","typescript":"^5.8.2","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/async_4.1.1_1742628347972_0.8572520940361048","host":"s3://npm-registry-packages-npm-production"}},"4.1.2":{"name":"@yume-chan/async","version":"4.1.2","keywords":["async","util"],"author":{"url":"https://chensi.moe/blog","name":"Simon Chan","email":"cnsimonchan@live.com"},"license":"MIT","_id":"@yume-chan/async@4.1.2","maintainers":[{"name":"yume-chan","email":"cnsimonchan@live.com"}],"homepage":"https://github.com/yume-chan/async#readme","bugs":{"url":"https://github.com/yume-chan/async/issues"},"dist":{"shasum":"5fab52d5917214b5e63388573a14ee9a0813d3ae","tarball":"https://registry.npmjs.org/@yume-chan/async/-/async-4.1.2.tgz","fileCount":43,"integrity":"sha512-PvudJZvctW0mcrxeYuYzCns2MygWypHANMa0f/uyNgJyrBXDyhnB7o4sPLY+sFIqYNY5TzLaZjkoKb+SMgaN9Q==","signatures":[{"sig":"MEUCIDG2dXTJpwqgo2DIA12+qBWrVzvcK+ChalHzvzC87dbrAiEAwi0WGs+eZ5OBa6SlmrYA5DMfI+iCOevbMMm3TrLZybs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26190},"main":"cjs/index.js","_from":"file:yume-chan-async-4.1.2.tgz","types":"dts/index.d.ts","module":"esm/index.js","exports":{"types":"./dts/index.js","import":"./esm/index.js","require":"./cjs/index.js"},"scripts":{"test":"jest","build":"rimraf --glob {cjs,esm,dts} *.tsbuildinfo && tsc -b tsconfig.esm.json tsconfig.cjs.json","coverage":"jest --coverage"},"_npmUser":{"name":"yume-chan","email":"cnsimonchan@live.com"},"_resolved":"C:\\Users\\simon\\AppData\\Local\\Temp\\ebd0d90761fcb793f0b3438c372ebacb\\yume-chan-async-4.1.2.tgz","_integrity":"sha512-PvudJZvctW0mcrxeYuYzCns2MygWypHANMa0f/uyNgJyrBXDyhnB7o4sPLY+sFIqYNY5TzLaZjkoKb+SMgaN9Q==","repository":{"url":"git+https://github.com/yume-chan/async.git","type":"git"},"_npmVersion":"10.9.2","description":"Utils for async programming.","directories":{},"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"6.0.1","ts-jest":"^29.2.6","typescript":"^5.8.2","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/async_4.1.2_1743777998788_0.6896898685262647","host":"s3://npm-registry-packages-npm-production"}},"4.1.3":{"name":"@yume-chan/async","version":"4.1.3","description":"Utils for async programming.","keywords":["async","util"],"license":"MIT","author":{"name":"Simon Chan","email":"cnsimonchan@live.com","url":"https://chensi.moe/blog"},"homepage":"https://github.com/yume-chan/async#readme","repository":{"type":"git","url":"git+https://github.com/yume-chan/async.git"},"bugs":{"url":"https://github.com/yume-chan/async/issues"},"type":"module","main":"cjs/index.js","module":"esm/index.js","types":"dts/index.d.ts","devDependencies":{"@jest/globals":"^29.7.0","@types/node":"^22.14.1","jest":"^29.7.0","ts-jest":"^29.2.6","typescript":"^5.8.2"},"exports":{"import":"./esm/index.js","require":"./cjs/index.js","types":"./dts/index.d.ts"},"scripts":{"build":"node build.js","test":"jest","coverage":"jest --coverage"},"_id":"@yume-chan/async@4.1.3","_integrity":"sha512-0vzhNJMkWUPyjKzUK4rqHEeCU6YQtF78RsB1kFRB6Y2BLupmEQNxcSb0mjKabPL9jZpCCiLa5KL8oTOJClUVaw==","_resolved":"C:\\Users\\simon\\AppData\\Local\\Temp\\ad6ef8a05ebd384224d740f3829acdaa\\yume-chan-async-4.1.3.tgz","_from":"file:yume-chan-async-4.1.3.tgz","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-0vzhNJMkWUPyjKzUK4rqHEeCU6YQtF78RsB1kFRB6Y2BLupmEQNxcSb0mjKabPL9jZpCCiLa5KL8oTOJClUVaw==","shasum":"7f4b6d3b1bc902f7ef225a5ade39796f56ccd589","tarball":"https://registry.npmjs.org/@yume-chan/async/-/async-4.1.3.tgz","fileCount":44,"unpackedSize":26483,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFQQZzynwLk9VQjG3GY8NmP7gz6RfwcPI9vWGnMJtqmuAiBFFUn3jpVJYhNJezomBkMOfZf1/tofX6hgEk3jwkpwWg=="}]},"_npmUser":{"name":"yume-chan","email":"cnsimonchan@live.com"},"directories":{},"maintainers":[{"name":"yume-chan","email":"cnsimonchan@live.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/async_4.1.3_1744907791120_0.3804718245615819"},"_hasShrinkwrap":false}},"time":{"created":"2021-01-29T02:26:54.163Z","modified":"2025-04-17T16:36:31.508Z","2.1.4":"2021-01-29T02:26:54.348Z","2.2.0":"2022-06-12T05:27:05.814Z","4.0.0":"2024-10-23T20:20:52.325Z","4.0.1":"2024-11-19T22:10:34.955Z","4.0.2":"2024-11-19T22:31:17.451Z","4.1.0":"2025-03-22T07:15:17.698Z","4.1.1":"2025-03-22T07:25:48.176Z","4.1.2":"2025-04-04T14:46:38.965Z","4.1.3":"2025-04-17T16:36:31.324Z"},"bugs":{"url":"https://github.com/yume-chan/async/issues"},"author":{"name":"Simon Chan","email":"cnsimonchan@live.com","url":"https://chensi.moe/blog"},"license":"MIT","homepage":"https://github.com/yume-chan/async#readme","keywords":["async","util"],"repository":{"type":"git","url":"git+https://github.com/yume-chan/async.git"},"description":"Utils for async programming.","maintainers":[{"name":"yume-chan","email":"cnsimonchan@live.com"}],"readme":"# Async\n\n![license](https://img.shields.io/npm/l/@yume-chan/async)\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/yume-chan/async/Node.js%20CI?label=build)\n![Codecov](https://img.shields.io/codecov/c/github/yume-chan/async?token=Z6KEN9JL2A)\n[![npm version](https://img.shields.io/npm/v/@yume-chan/async)](https://www.npmjs.com/package/@yume-chan/async)\n![npm type definitions](https://img.shields.io/npm/types/@yume-chan/async)\n\nUtils for async programming.\n\n- [PromiseResolver](#promiseresolver)\n- [AsyncOperationManager](#asyncoperationmanager)\n\n## PromiseResolver\n\n``` ts\nexport type PromiseResolverState = 'running' | 'resolved' | 'rejected';\n\nexport class PromiseResolver<T> {\n    readonly promise: Promise<T>;\n    readonly state: PromiseResolverState;\n\n    resolve(value?: T | PromiseLike<T>): void;\n    reject(reason?: any): void;\n}\n```\n\nC#, the origin of the async/await pattern, uses [`TaskCompletionSource`](https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.taskcompletionsource-1) to manage `Task`s manually.\n\nV8, the most commonly used JavaScript engine, uses `PromiseResolver` to manage `Promise`s manually.\n\nBut in JavaScript, we only have the `Promise` constructor, and there is no way to know the `Promise`'s state.\n\nNow you can use this `PromiseResolver` class to create and manage `Promise`s more conveniently.\n\n``` ts\nfunction delay(timeout: number): Promise<void> {\n    const resolver = new PromiseResolver<void>();\n    setTimeout(() => resolver.resolve(), timeout);\n    return resolver.promise;\n}\n```\n\n## AsyncOperationManager\n\n``` ts\nexport interface AsyncOperationInfo<T> {\n    id: number;\n    promise: Promise<T>;\n}\n\nexport default class AsyncOperationManager {\n    add<T>(): AsyncOperationInfo<T>;\n\n    resolve<T>(id: number, result: T): void;\n    reject(id: number, reason: Error): void;\n}\n```\n\nAssume you have an RPC service, every operation has an ID, and the remote will return the result with this ID.\n\n`AsyncOperationManager` can help you manage the IDs and convert callbacks to `Promise`s.\n\n``` ts\ndeclare const MyService;\nconst manager = new AsyncOperationManager();\n\nMyService.on('complete', (id: number, result: number) => {\n    manager.resolve(id, result);\n});\n\nMyService.on('error', (id: number, message: string) => {\n    manager.reject(id, new Error(message));\n});\n\nfunction callService(payload: number): Promise<number> {\n    const { id, promise } = manager.add<number>();\n    MyService.post({ id, payload });\n    return promise;\n}\n```\n","readmeFilename":"README.md"}