{"_id":"jrx","_rev":"17-a038e0ea57438b64c2c901e0fe3b2c47","name":"jrx","dist-tags":{"alpha":"0.3.0-alpha.9","latest":"0.4.0"},"versions":{"0.0.1":{"name":"jrx","version":"0.0.1","_id":"jrx@0.0.1","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"d82e1c50b82e52a34c05d3b6279d86487727db19","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.0.1.tgz","fileCount":6,"integrity":"sha512-VW1T3tlthAlFpEVJisoRG1pnWPXM4B94BbX0J4a7zFCmnlWoeOBjxdAXPJJ4Hu9fxrobpOPJ2DS2xZ0z9zpBPw==","signatures":[{"sig":"MEYCIQC9C08gf3wo716U2pFj8fMXdPB80kwotYHyHjWy1vDs+wIhAMtwklfIjCu4J8Qe6Ia0dmhOq5xIIwNNNMfcyORIu8hC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12285},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.js"},"./retry":{"types":"./retry.d.ts","import":"./retry.js"},"./computed":{"types":"./computed.d.ts","import":"./computed.js"}},"gitHead":"d455cfe711b9c07011dd5799d298bdd2f8e86455","scripts":{"test":"node --test tests/*.test.ts","test:coverage":"node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc index.ts retry.ts --target esnext --declaration --moduleResolution node"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.6.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup. Built on top of [jdisposer](https://github.com/tranvansang/jdisposer) for safe resource management.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"jdisposer":"^0.0.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.0.1_1770505371619_0.9139581795839642","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"jrx","version":"0.0.2","_id":"jrx@0.0.2","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"5db750ae819e2da1a191c617b80d204e88d630c1","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.0.2.tgz","fileCount":8,"integrity":"sha512-hBo4/Fkqn6/jkcvYXqahq9phFSU8TXVQAXcA37TCeu23Hlp0F0X6FG9yTBHKvyU8ja22HgX3iVL6Jg6DNEaX8Q==","signatures":[{"sig":"MEYCIQDsmWCvDx5Od8owXBwN81UFURT6PX5KGH6WFgManZG38gIhAMCb9eiqoMGy8LdAEkxMS819U9Be8cHJ/1EZTvhqvCq2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12920},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.js"},"./retry":{"types":"./retry.d.ts","import":"./retry.js"},"./computed":{"types":"./computed.d.ts","import":"./computed.js"}},"gitHead":"65e0c123c4a67769514303e9cb92d29f0dd19778","scripts":{"test":"node --test tests/*.test.ts","test:coverage":"node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc index.ts retry.ts computed.ts --target esnext --declaration --moduleResolution node"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.6.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup. Built on top of [jdisposer](https://github.com/tranvansang/jdisposer) for safe resource management.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"jdisposer":"^0.0.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.0.2_1770507671465_0.25053931398255336","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"jrx","version":"0.1.0","_id":"jrx@0.1.0","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"2137366410534b8c5b3824f75da441307da22808","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.1.0.tgz","fileCount":8,"integrity":"sha512-/2erls++JNpn3/Gdbrko9c4t3XOOMAH0iyLS+c0Je6atLlBfK+fPSJUI7pnTpdaRS51viC6BN9UD1FFzG1onTw==","signatures":[{"sig":"MEUCIBdNjsxCK+K03YtJllnD2S46HRKC2qcINGAifatYKh3WAiEAtyd99ySzckvPi9futNZW7oyqAWKJNEnzutLKk3NjR14=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15137},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.js"},"./retry":{"types":"./retry.d.ts","import":"./retry.js"},"./computed":{"types":"./computed.d.ts","import":"./computed.js"}},"gitHead":"4b10f5aa0039ebb0829442d60722bb3c56102c0c","scripts":{"test":"node --test tests/*.test.ts","test:coverage":"node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc index.ts retry.ts computed.ts --target esnext --declaration --moduleResolution node"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.6.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup. Built on top of [jdisposer](https://github.com/tranvansang/jdisposer) for safe resource management.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"jdisposer":"^0.0.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.1.0_1771014172789_0.3154359221203258","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"jrx","version":"0.2.0","_id":"jrx@0.2.0","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"fc8b93c2a6b04a4239fa65a77b6d85f023dc94ca","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.2.0.tgz","fileCount":10,"integrity":"sha512-4k0ndEWsgnX0reOZG166/Jyg7/J4ZwFwtw6vfdyq780lQjgDkiJLIGYvN3mQOxbrr903haZ3xtxGyxhHAl+rZQ==","signatures":[{"sig":"MEUCICly28eF4/g35IY9p4kSLPNM1sIHCQ+tS/TBgPyIz6jzAiEAqkezYbIVJta3MLiI+oYf1xAfntsq+MofuoOhtZXT5bg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17619},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.js"}},"gitHead":"70d4f26c6e8f3efd58869cfda0f4ee90877bd778","scripts":{"test":"node --test tests/*.test.ts","test:coverage":"node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.6.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup. Built on top of [jdisposer](https://github.com/tranvansang/jdisposer) for safe resource management.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"jdisposer":"^0.0.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.2.0_1772245887192_0.20951816592036865","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"jrx","version":"0.2.1","_id":"jrx@0.2.1","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"46e7e91bc53d02029c870bd052c8bea2627955c9","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.2.1.tgz","fileCount":10,"integrity":"sha512-XEfgU3ZLsjOxScq/RmGKCvvZbhzLbeq68L106ni+lGHcSWXzHDD/NAYk4AS54L43zgS5o050kMZ+tiCmpocAsw==","signatures":[{"sig":"MEYCIQDr6eS1OtXWqcPqXJZrZSs17V4MRdU4hWc22i6fj8CycAIhAJA/numH8PqTtnTO1ZVqvyLkONkln7/wuNoPAdd1w0lL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18813},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.js"}},"gitHead":"cb28f5b207763bd4d8f7419075f167e757df003e","scripts":{"test":"node --test tests/*.test.ts","test:coverage":"node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.6.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup. Built on top of [jdisposer](https://github.com/tranvansang/jdisposer) for safe resource management.","directories":{},"_nodeVersion":"24.11.0","dependencies":{"jdisposer":"^0.0.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.2.1_1772289656523_0.3552852199127208","host":"s3://npm-registry-packages-npm-production"}},"0.3.0-alpha.1":{"name":"jrx","version":"0.3.0-alpha.1","_id":"jrx@0.3.0-alpha.1","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"cb3f135930c4f537f22c7fc3e5a97bd9ef96cd3e","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.3.0-alpha.1.tgz","fileCount":8,"integrity":"sha512-EVGshOLoyEkxJEUZZUm2aARnorEvVJPZB6Oh9zF/v00aFi4ZFPAUjQJMlGj8CiUK9nXPWiHY7yxy4nHHwjNosA==","signatures":[{"sig":"MEYCIQCnxgws5BlVOZQojD+AkjAaBoWC/OHsZIayWiTZCUappQIhALuHNp/rdzdPhoBY+l877xT+OfVTgdVTpNvRlHeFI2Bn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15294},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.js"}},"gitHead":"1c9844b39b7463a0b5201142c6bf08698c2c7356","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.12.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.3.0-alpha.1_1775433325197_0.5273631574712376","host":"s3://npm-registry-packages-npm-production"}},"0.3.0-alpha.2":{"name":"jrx","version":"0.3.0-alpha.2","_id":"jrx@0.3.0-alpha.2","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"4542f3599f166daf5d83442493b8c17975f05d12","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.3.0-alpha.2.tgz","fileCount":8,"integrity":"sha512-uIxOl7i8043Vg4zpug8TLbu8ZD4CXquycJGWOj3HyJ0yYkuvP8rsR9Z6edclrKKpMIFbLBqTwE+eQkKB+31l/A==","signatures":[{"sig":"MEUCIQD01OflBUAnykAAQfU18tdC4ODjCv6oRsoB4OMc/1OXXgIgTJSZHVKWSqYOHC61+tgWxT69VeSjTEHWgLtd8BwjZwg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15746},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.js"}},"gitHead":"0bf34cd9f86603128ab089b8c07bfd1af533d405","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.12.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.3.0-alpha.2_1775522898084_0.11345413733846477","host":"s3://npm-registry-packages-npm-production"}},"0.3.0-alpha.3":{"name":"jrx","version":"0.3.0-alpha.3","_id":"jrx@0.3.0-alpha.3","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"99cbe079a8382090464fc6c6c34828305b291f5d","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.3.0-alpha.3.tgz","fileCount":8,"integrity":"sha512-bPYUJcnyA01+e2rcmdcjUhHjohxHWRd68QaTChZY8G7UFz5JQRg+yDAFaYnLkf28tfajiKpOQWhd2XESk5aMRA==","signatures":[{"sig":"MEUCIHqg/eBpb04zxIiZl2CGTrXqkurO5SBXMLLw/ii6+oSaAiEAojCUPFkZRn8OqGrcpvpIFHkYkbc8f7SxHytMP/d2HlM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16119},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.js"}},"gitHead":"ab98644b3266ec9f8339ae20fc885b7bb1f5c2df","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.12.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.3.0-alpha.3_1775524491671_0.3799002968624763","host":"s3://npm-registry-packages-npm-production"}},"0.3.0-alpha.4":{"name":"jrx","version":"0.3.0-alpha.4","_id":"jrx@0.3.0-alpha.4","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"06163664403a68ba80695af0c78dff7222a85725","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.3.0-alpha.4.tgz","fileCount":8,"integrity":"sha512-8YPmQKJD8kB5762kGp0tMeKow2WGcyjqkyZKv2dshWz/42jVe9aWQbx3B+Fjv5zJnm3tYZI5NOBdPfar2Vr47w==","signatures":[{"sig":"MEQCIDx45sENILc6DNmTIl2V98EmRtnOkZG8Kxu9KkAAmxNeAiAgmvJcIfP6M3tbzOacyjFzLpbwFeNIb+fZp0ELX+ch0w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16090},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.js"}},"gitHead":"2f690afe00f0ed9a9b59596746f24958e477816f","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.12.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.3.0-alpha.4_1775553245354_0.7948214282825856","host":"s3://npm-registry-packages-npm-production"}},"0.8.0-alpha.2":{"name":"jrx","version":"0.8.0-alpha.2","_id":"jrx@0.8.0-alpha.2","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"bfdf4879f62d7cc6b892b0d2910d28dc565ccf09","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.8.0-alpha.2.tgz","fileCount":8,"integrity":"sha512-eLcjoCUHI9m9tdgcb75ibvsondZeEvwiJWCLaUZV1/34Bg1cBQacLmyCM77411ClTbkk5YG0D3rFkco5f698TA==","signatures":[{"sig":"MEQCIBQoctyFMeR64dzmmp8/TyjZguZJVfoucg/mCOlwG0WKAiB3q3GtpKYQVVIKxYHVqOURazA17cZEz29dr7+n4jS6NQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16091},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"845e6c35cbe502e8b5bb7ffe169320ea04cc74e5","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.12.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.8.0-alpha.2_1775555065800_0.42542592867751816","host":"s3://npm-registry-packages-npm-production"}},"0.3.0-alpha.5":{"name":"jrx","version":"0.3.0-alpha.5","_id":"jrx@0.3.0-alpha.5","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"bd935d37701685c1b19efe0389a65a6846da4b76","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.3.0-alpha.5.tgz","fileCount":8,"integrity":"sha512-0rnaIW7sm4X7EhxgLwMqf6nStbuJx1WEDGlIZbtSp8KvkNPdOHjC7oIlZBkiqxc+Tla8T1Ekf5oqfAxloq85GA==","signatures":[{"sig":"MEYCIQCLa0eKXbFTK0+VjUDuFDsRNATAB2AjKtTT6G9Qzj19ZAIhAPLGl4ByA1seTHdtnCNCEUfRmOLzopJ46HWWRRTxNTMe","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16091},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"1059e0cdb986315796ac702d308f468164429fa8","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.12.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.3.0-alpha.5_1775555274035_0.3593353719257679","host":"s3://npm-registry-packages-npm-production"}},"0.3.0-alpha.6":{"name":"jrx","version":"0.3.0-alpha.6","_id":"jrx@0.3.0-alpha.6","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"047a631d9a28fc99151bcaaf4838f70be9b5168e","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.3.0-alpha.6.tgz","fileCount":8,"integrity":"sha512-rUU7iVZjydzu5wB+lYlvwdUmrHoA9oKUDkKFnRRYuhaig6ZHzVi6MZh5rBh/g7/h5az/bV73RVYtfKrZe8O2jA==","signatures":[{"sig":"MEUCIQDQ8DtCHCws2jCBm5HF/1tKqyFAng6mqydCwfzkf2ea5QIgHAFxW3tjph1lYzXZvSyRv23RLHbd3iPbwo7uWmmE3cM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16905},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"b6939e35edf6579deb7f257a4270a2120c5d3941","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.12.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.3.0-alpha.6_1777724553162_0.3748252825384186","host":"s3://npm-registry-packages-npm-production"}},"0.3.0-alpha.7":{"name":"jrx","version":"0.3.0-alpha.7","_id":"jrx@0.3.0-alpha.7","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"ec4c29c1ae24ade0417830a1f9f0faeb4b71383d","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.3.0-alpha.7.tgz","fileCount":8,"integrity":"sha512-u/IOiy6RA/2PVdq0MKU4IEfb6+0AAmbLWF91eRbmvHEKG8tXoc/JZFiQukU6C0IaQ1Rr5Ybvx3NHBqpdSBenOA==","signatures":[{"sig":"MEQCIDKeOGzgKPabe/jDm32FrnJgYwCEAD5GyIxrQaY1Hh1UAiAyRi7SYVjwPuTvB9Rf/7/4LGxBWF4rk7siCyI9ENiuEQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18444},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"ac7f2a6ac0ea52ccd17771b73da9bd6cc66b4aec","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.12.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.3.0-alpha.7_1777741068576_0.2574727227349882","host":"s3://npm-registry-packages-npm-production"}},"0.3.0-alpha.8":{"name":"jrx","version":"0.3.0-alpha.8","_id":"jrx@0.3.0-alpha.8","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"70a02a35c4166c2cc1dbf453ad9e77f298227ddc","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.3.0-alpha.8.tgz","fileCount":8,"integrity":"sha512-WAJKvvsnTUOjVie5ezDbufQgk/Fj11IcDFjlXho3NtqrONnbPmc+ite9T265ZqSPhYASkGR46TrFtZfqsIIYVA==","signatures":[{"sig":"MEYCIQDGN8oQ/tLccpG+jY6dFZUFfbTM249lsY7z9/Rv6HFwVAIhAJrJE25WlyJnrxS0xI/h3A3GgkkdY+Er7JwpDFJ19Jrh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18653},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"a83bac5e67fa3a9169eddb1a4c68dd946ae0aff9","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.12.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.3.0-alpha.8_1777795821947_0.4725770741877451","host":"s3://npm-registry-packages-npm-production"}},"0.3.0-alpha.9":{"name":"jrx","version":"0.3.0-alpha.9","_id":"jrx@0.3.0-alpha.9","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"2a6105c0525f62445c7295342f0cdb50e02cb8ff","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.3.0-alpha.9.tgz","fileCount":4,"integrity":"sha512-SF/UPLV5voJxUneos/boQ3vhk3m5JsKfjTcAC1euGHLaEuLYElXeI7wT5gXjkyOseLFd/WJu43uMxCjS9iGDZw==","signatures":[{"sig":"MEUCICKcvUayJ/vIapYnv7urTsC9AeR+fZ+RjAArJh2sDs77AiEAn/eO5wp8ITOdRIsZAn0VS+YiyR+CHCbqTE7KdWIi+fo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14184},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"e77ab84acdf6737f231422c627d7b121fc8eaea8","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.12.1","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.3.0-alpha.9_1777800773181_0.9455877457257731","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"jrx","version":"0.3.0","_id":"jrx@0.3.0","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"homepage":"https://github.com/tranvansang/jrx#readme","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"a26b66180bd9801200870a4dd71a3e0fe5d57712","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.3.0.tgz","fileCount":4,"integrity":"sha512-S/Tu9fxyquo1NS8xk+YUT6/+bVK7W4uo/fhvA2FHcY79YZIN0XPABp32U5M5vz7cxj1SsTGvJlzAso9PnOolDA==","signatures":[{"sig":"MEUCIDQ3s1YGWjo9bQqF3+lEXKbKTi2gEMDc+NeEmZCoatWdAiEA8UvfY1Qh+9KiEptW1TGKQPuvT5kHfE2SFYThQ7VzpFQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14176},"type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"c0c6ccfd957364bbf836718fb6a887f884ea3499","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.13.0","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"_nodeVersion":"26.2.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"tmp":"tmp/jrx_0.3.0_1780540530285_0.13484704012893278","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"_id":"jrx@0.4.0","bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"dist":{"shasum":"94c08a06a6a6c23afbfff2cb88138f283e0842fa","tarball":"https://registry.npmjs.org/jrx/-/jrx-0.4.0.tgz","fileCount":4,"integrity":"sha512-dZIyVbfHYCIpBhxI2szWH5M45l2HfUcOIY0Bhzspjo+pLiUVc9LJwXOI8xyCX1QQTBBVXyGl7y4YDsFLkcemwQ==","signatures":[{"sig":"MEUCIG2cU8aff6D1eQmu1eY3iL1VEkS9gcBSEyBEB9nLDBqbAiEAvmbdhr6TKZ5jBV4H7Xn/MGsrE5Zivqlre24XphZ+yY4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG2+xnnsvXjHcUqujWISIpV/+s+uTkA6yWaUYlZjZj2cAiAWIW9ygY58CCOtzYNGCKLYehSzmHXZLrqfMGHC2MFUpg=="}],"unpackedSize":21806},"name":"jrx","type":"module","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","default":"./index.js"}},"gitHead":"97b5124ac313347f172ef50be1aae72992506e04","scripts":{"test":"npm run prepublishOnly && node --test tests/*.test.ts","test:coverage":"npm run prepublishOnly && node --test --experimental-test-coverage tests/*.test.ts","prepublishOnly":"npx tsc"},"version":"0.4.0","_npmUser":{"name":"tranvansang","email":"t@sang.jp"},"homepage":"https://github.com/tranvansang/jrx#readme","repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"_npmVersion":"11.20.0","description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","directories":{},"maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"_nodeVersion":"26.12.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.2","@types/node":"^25.2.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jrx_0.4.0_1795382018440_0.18658113156132905"}}},"time":{"created":"2026-02-07T23:02:51.618Z","modified":"2026-11-22T21:13:38.699Z","0.0.1":"2026-02-07T23:02:51.773Z","0.0.2":"2026-02-07T23:41:11.616Z","0.1.0":"2026-02-13T20:22:52.959Z","0.2.0":"2026-02-28T02:31:27.330Z","0.2.1":"2026-02-28T14:40:56.665Z","0.3.0-alpha.1":"2026-04-05T23:55:25.329Z","0.3.0-alpha.2":"2026-04-07T00:48:18.235Z","0.3.0-alpha.3":"2026-04-07T01:14:51.834Z","0.3.0-alpha.4":"2026-04-07T09:14:05.497Z","0.8.0-alpha.2":"2026-04-07T09:44:25.933Z","0.3.0-alpha.5":"2026-04-07T09:47:54.173Z","0.3.0-alpha.6":"2026-05-02T12:22:33.316Z","0.3.0-alpha.7":"2026-05-02T16:57:48.719Z","0.3.0-alpha.8":"2026-05-03T08:10:22.121Z","0.3.0-alpha.9":"2026-05-03T09:32:53.319Z","0.3.0":"2026-06-04T02:35:30.418Z","0.4.0":"2026-11-22T21:13:38.526Z"},"bugs":{"url":"https://github.com/tranvansang/jrx/issues"},"homepage":"https://github.com/tranvansang/jrx#readme","repository":{"url":"git+https://github.com/tranvansang/jrx.git","type":"git"},"description":"A lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.","maintainers":[{"name":"tranvansang","email":"t@sang.jp"}],"readme":"# jrx\n\nA lightweight TypeScript library for managing side effects, subscriptions, and animations with automatic cleanup using the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) API.\n\n## Prerequisites\n\nThis library requires the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) globals (`DisposableStack`, `AsyncDisposableStack`, `Symbol.dispose`, `Symbol.asyncDispose`). If your environment does not support them natively, you must load a polyfill before importing jrx (e.g. [`core-js`](https://github.com/nicolo-ribaudo/tc39-proposal-explicit-resource-management-polyfill)).\n\nThe `using` keyword is **not** required — this library only uses the API objects directly, so no transpiler support for `using` declarations is needed.\n\n## Installation\n\n```bash\nnpm i jrx\n```\n\n## Features\n\n- Automatic cleanup for all effects and subscriptions\n- Built on the native `DisposableStack` / `AsyncDisposableStack` API\n- Zero dependencies\n- Composable reactive utilities\n- Browser and Node.js compatible\n\n## API Overview\n\n- [`makeReset()`](#makereset) - Create a resettable `DisposableStack`\n- [`makeAsyncReset()`](#makeasyncreset) - Create a resettable `AsyncDisposableStack`\n- [`makeRenderLoop()`](#makerenderloop) - Render loops with automatic cleanup\n- [`createInterval(cb, ms)`](#createIntervalcb-ms) - Repeating intervals with cleanup\n- [`createIntervalAsync(cb, ms)`](#createIntervalasynccb-ms) - Async intervals with cancellation\n- [`createAnimationFrame(cb)`](#createAnimationFramecb) - Single animation frame with cleanup\n- [`createAnimationFrameLoop(cb)`](#createAnimationFrameloopcb) - Animation frame loops\n- [`createTimeout(cb, ms)`](#createTimeoutcb-ms) - Timeouts with cleanup\n- [`createTransition(cb, durationMs)`](#createTransitioncb-durationms) - Progress-based animations\n- [`assignDispose(value, disposable)`](#assigndisposevalue-disposable) - Attach a `Symbol.dispose` to any value\n- [`assignDisposeAsync(value, disposable)`](#assigndisposeasyncvalue-disposable) - Attach a `Symbol.asyncDispose` to any value\n\n## Naming convention\n\nFunctions prefixed with `create*` return a `Disposable` object. The returned object can be passed to [`DisposableStack.use()`](https://github.com/tc39/proposal-explicit-resource-management) or bound with the `using` keyword for automatic cleanup.\n\n```typescript\nimport {createInterval, createTimeout} from 'jrx'\n\n// With DisposableStack.use()\nusing stack = new DisposableStack()\nstack.use(createInterval(() => console.log('tick'), 1000))\nstack.use(createTimeout(() => console.log('done'), 5000))\n// Both are disposed when `stack` goes out of scope\n\n// Or directly with `using`\nusing interval = createInterval(() => console.log('tick'), 1000)\n// Disposed when the enclosing block exits\n```\n\n## API\n\n### `makeReset()`\n\nCreates a resettable `DisposableStack`. Each call disposes the previous stack and returns a new one.\n\n```typescript\nimport {makeReset} from 'jrx'\n\nconst reset = makeReset()\nconst stack = reset() // Get a fresh DisposableStack\n\n// Add disposables\nstack.use(someDisposable)\n\n// Reset - disposes previous stack, returns new one\nconst newStack = reset()\n```\n\nIf a cleanup of the previous stack calls `reset()` itself, the stack of that call is the one in use. The outer call returns a stack that is disposed already: check `stack.disposed` before using it. If a cleanup throws, `reset()` throws after every cleanup was called, and the next `reset()` works as usual.\n\n### `makeAsyncReset()`\n\nAsync version of `makeReset` using `AsyncDisposableStack`.\n\n```typescript\nimport {makeAsyncReset} from 'jrx'\n\nconst reset = makeAsyncReset()\nconst stack = await reset() // Get a fresh AsyncDisposableStack\n```\n\nCalls of `reset()` that overlap run one at a time, in the order they were made: a call disposes the stack of the call before it, and waits for that. So a call that was overtaken by a later one may return a stack that is disposed already: check `stack.disposed` before using it. A cleanup must not wait for a `reset()` call that was made after the one that disposes it: the two would wait for each other.\n\n### `makeRenderLoop()`\n\nCreates a render loop with automatic cleanup management.\n\n```typescript\nimport {makeRenderLoop} from 'jrx'\n\nconst {loop, setLoop} = makeRenderLoop()\n\n// Set the loop function - returns a Disposable\nconst handle = setLoop(time => {\n\tconsole.log('Frame time:', time)\n\n\t// Optional: return a Disposable for cleanup\n\treturn {\n\t\t[Symbol.dispose]() {\n\t\t\tconsole.log('Cleanup previous frame')\n\t\t},\n\t}\n})\n\n// Call loop on each animation frame\nrequestAnimationFrame(loop)\n\n// Cleanup\nhandle[Symbol.dispose]()\n```\n\n`setLoop()` replaces the loop function that was set before. The handle of a loop function that was replaced does nothing: only the handle of the loop function that is set unsets it. If the loop function or a cleanup throws, `loop()` throws that error, and the next `loop()` works as usual.\n\n### `createInterval(cb, ms)`\n\nCreates a repeating interval with cleanup. The callback can optionally return a `Disposable` that is disposed before the next invocation. Returns a `Disposable`.\n\n**Note:** The callback fires **immediately** on first call, then waits `ms` milliseconds **after** the previous callback completes. This is not a fixed-rate timer.\n\n```typescript\nimport {createInterval} from 'jrx'\n\nconst handle = createInterval(() => {\n\tconsole.log('Tick') // Called immediately, then every 1000ms after completion\n\n\t// Optional: return a Disposable for cleanup\n\treturn {\n\t\t[Symbol.dispose]() {\n\t\t\tconsole.log('Cleanup')\n\t\t},\n\t}\n}, 1000)\n\n// Stop the interval\nhandle[Symbol.dispose]()\n```\n\n### `createIntervalAsync(cb, ms)`\n\nAsync version of `createInterval`. Waits for the callback to complete before scheduling the next invocation. Returns a `Disposable`.\n\n**Note:** The callback fires **immediately** on first call, then waits `ms` milliseconds **after** the previous async callback completes.\n\n```typescript\nimport {createIntervalAsync} from 'jrx'\n\nconst handle = createIntervalAsync(async () => {\n\t// Called immediately, then 5000ms after each completion\n\tawait fetchData()\n\tprocessData()\n}, 5000)\n\nhandle[Symbol.dispose]()\n```\n\n### `createAnimationFrame(cb)`\n\nExecutes a callback on the next animation frame with cleanup. Returns a `Disposable`.\n\n```typescript\nimport {createAnimationFrame} from 'jrx'\n\nconst handle = createAnimationFrame(now => {\n\tupdateAnimation(now)\n\n\t// Optional: return a Disposable for cleanup\n\treturn {\n\t\t[Symbol.dispose]() {\n\t\t\tcleanupAnimation()\n\t\t},\n\t}\n})\n\n// Cancel if needed before the frame fires\nhandle[Symbol.dispose]()\n```\n\n### `createAnimationFrameLoop(cb)`\n\nCreates a continuous `requestAnimationFrame` loop with cleanup. Returns a `Disposable`.\n\n```typescript\nimport {createAnimationFrameLoop} from 'jrx'\n\nconst handle = createAnimationFrameLoop(now => {\n\tupdateAnimation(now)\n\n\t// Optional: return a Disposable for cleanup\n\treturn {\n\t\t[Symbol.dispose]() {\n\t\t\tcleanupAnimation()\n\t\t},\n\t}\n})\n\n// Stop the loop\nhandle[Symbol.dispose]()\n```\n\n### `createTimeout(cb, ms)`\n\nCreates a timeout with cleanup. Returns a `Disposable`.\n\n```typescript\nimport {createTimeout} from 'jrx'\n\nconst handle = createTimeout(() => {\n\tconsole.log('Timeout fired')\n}, 1000)\n\n// Cancel if needed\nhandle[Symbol.dispose]()\n```\n\n### `createTransition(cb, durationMs)`\n\nCreates an animation transition with progress tracking (0 to 1). Returns a `Disposable`.\n\n```typescript\nimport {createTransition} from 'jrx'\n\nconst handle = createTransition(progress => {\n\telement.style.opacity = progress.toString()\n\n\t// Optional: return a Disposable for cleanup\n\treturn {\n\t\t[Symbol.dispose]() {\n\t\t\tconsole.log('Frame cleanup')\n\t\t},\n\t}\n}, 1000)\n\nhandle[Symbol.dispose]()\n```\n\n### `assignDispose(value, disposable)`\n\nAttaches a `Symbol.dispose` to an existing value (object, function, array, promise, etc.) that delegates to a given `Disposable`. Returns the same value, now also typed as `Disposable`.\n\nThis is useful when a function needs to return a meaningful value **and** be disposable — for example, returning a promise, a function, or a tuple from a factory while still allowing the caller to clean up the underlying resources.\n\n```typescript\nimport {assignDispose} from 'jrx'\n\nfunction makeThing() {\n\tusing stack = new DisposableStack()\n\tstack.defer(() => console.log('cleanup'))\n\n\tconst obj = {value: 42}\n\treturn assignDispose(obj, stack.move())\n}\n```\n\nIf `value` is itself a `Disposable`, disposing the returned value disposes `value` first, then `disposable`. `disposable` is disposed even if the dispose of `value` throws. The error is thrown after both, as a `DisposableStack` reports it: a `SuppressedError` when both threw.\n\n### `assignDisposeAsync(value, disposable)`\n\nLike `assignDispose`, but takes an `AsyncDisposable` and attaches a `Symbol.asyncDispose` instead. Disposal is awaited — use this whenever cleanup is asynchronous and the value will be released with `await using` or `AsyncDisposableStack.use()`.\n\n```typescript\nimport {assignDisposeAsync} from 'jrx'\n\nfunction loadThing() {\n\tconst stack = new AsyncDisposableStack()\n\treturn assignDisposeAsync(\n\t\t(async () => {\n\t\t\tconst res = await fetch('/api/data', {signal: stack.adopt(new AbortController(), c => c.abort()).signal})\n\t\t\treturn await res.json()\n\t\t})(),\n\t\tstack,\n\t)\n}\n\n{\n\tawait using thing = loadThing()\n\tconsole.log(await thing)\n} // stack is awaited here\n```\n\nIf `value` has its own `Symbol.asyncDispose`, it is awaited first, then the `disposable`. The `disposable` is disposed even if the dispose of `value` rejects. The error comes after both, as an `AsyncDisposableStack` reports it: a `SuppressedError` when both rejected.\n\n> Pick the variant that matches your cleanup: `assignDispose` attaches only `Symbol.dispose` (sync, use with `using`), `assignDisposeAsync` attaches only `Symbol.asyncDispose` (async, use with `await using`). Each attaches a single symbol so the type system steers you to the correct disposal form.\n\n## Cleanup Pattern\n\nAll effect functions return a `Disposable` object that stops the effect and runs any pending cleanup:\n\n```typescript\nimport {createInterval, createTimeout, createAnimationFrame, createTransition} from 'jrx'\n\n// Each function returns a Disposable\nconst interval = createInterval(() => console.log('tick'), 1000)\nconst timeout = createTimeout(() => console.log('timeout'), 5000)\nconst raf = createAnimationFrame(now => render(now))\nconst transition = createTransition(p => console.log(p), 1000)\n\n// Call [Symbol.dispose]() to stop the effect\ninterval[Symbol.dispose]()\ntimeout[Symbol.dispose]()\nraf[Symbol.dispose]()\ntransition[Symbol.dispose]()\n```\n\n## Callbacks that dispose or throw\n\nA callback (`cb`, or the loop function of `makeRenderLoop`) and the cleanup it returns may dispose the handle of their own effect, and may throw. This is what happens then:\n\n- A callback disposes its own handle: the effect stops, and the cleanup that this call returns is called right away.\n- A cleanup disposes the handle of its effect: the effect stops. The callback is not called again.\n- A cleanup throws while the handle is disposed: the dispose of the handle throws that error. The effect is stopped all the same.\n- A callback or a cleanup throws while the effect runs: that call ends there, and nothing is scheduled after it. The effect is over, and its handle still disposes what is left. The error goes to the code that called the callback:\n\t- `createInterval`: the first call is made by `createInterval()` itself, which throws the error and returns no handle. A later call is made by the timer, so the error is uncaught.\n\t- `createIntervalAsync`: the error is an unhandled rejection, in the first call as well. So is a promise of `cb` that rejects.\n\t- `createAnimationFrame`, `createAnimationFrameLoop`, `createTransition`: the call is made by the frame, so the error is uncaught.\n\t- `makeRenderLoop`: `loop()` throws the error. This one is not over: the next `loop()` calls the loop function again.\n\nCatch errors inside the callback to keep an effect running.\n\n## TypeScript\n\nThis library is written in TypeScript and uses the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) types (`Disposable`, `DisposableStack`, `AsyncDisposableStack`).\n\n## License\n\nMIT\n\n## Repository\n\nhttps://github.com/tranvansang/jrx\n","readmeFilename":"README.md"}