{"versions":{"1.0.0":{"name":"better-result","version":"1.0.0","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test","check":"tsc --noEmit","publish":"npm publish","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"gitHead":"1df01ef2c09a763a6a357dafd78b54040877b692","_id":"better-result@1.0.0","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-Knd3D8J+eEOWJBbK2dsqAvuEMugd8QxA77bhV/ScAkHcQ5+V7eGulnrWoMXCBSoktJBg70fsZnKOX4kw02ZkIA==","shasum":"0d83cf83d1b2c2e81215d53e488068c2590cad1d","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-1.0.0.tgz","fileCount":13,"unpackedSize":123501,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIE+Kn9l/EyIFAdsgG+h/LUs15rijusVmDffXvbG8UxAEAiAIrZvApUs99hMxwVbUQH6ls3jPI9x7y6OSLdIbT6Y61Q=="}],"size":27835},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_1.0.0_1767972690783_0.4351840882871183"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-09T15:31:30.912Z","publish_time":1767972690912,"_source_registry_name":"default","contributors":[]},"1.0.1":{"name":"better-result","version":"1.0.1","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test","check":"tsc --noEmit","publish":"npm publish","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"gitHead":"f955ee9991d500b1ee46752e9c3187dffd5cf418","_id":"better-result@1.0.1","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-5IUPG5P3cUJgAc7rizc3heHqcJzVQDG+YrcJXhjhsjfJrFdCerpfe0RTL3nIYJCT3nU3GN/BJCaahIyqWfLYyg==","shasum":"20e789ba1ec4e01c57bf30a59c3fcff677dcec88","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-1.0.1.tgz","fileCount":13,"unpackedSize":137163,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD+URLK0wTwOt1KI+6Ev0FcrMEqdadW2IVkDy/HDhrgaAIgZugXtGhHfC/Dv8r9sV3t0EmhcnAU0e+jpEyaa/DHaao="}],"size":30592},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_1.0.1_1768369580433_0.8728193363491945"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-14T05:46:20.565Z","publish_time":1768369580565,"_source_registry_name":"default","contributors":[]},"2.0.0":{"name":"better-result","version":"2.0.0","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"bin":{"better-result":"bin/cli.mjs"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","publish":"npm publish","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"dependencies":{"@clack/prompts":"^0.11.0"},"gitHead":"e9ba1da4a5bf7c15c89577ecdad9cefd469e7f55","_id":"better-result@2.0.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-72GfHw5FQp2GylNeoQPAmXDQj2e0HBeMuyGwVd1eM5HahvC2pysdBjCOuRASfQ2ZLeykiFaVOs3455a78+Dh3Q==","shasum":"46339e27789eeb167351f09774bfae935ba383eb","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.0.0.tgz","fileCount":17,"unpackedSize":226227,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDZW6uFRYWJOQPKzcbjjRcfbvfPpNNsOukfGSbM4nJdogIhAPSVp4mnmmuXD41OA71VjY1IMhRdypz26uhisYcTQx8c"}],"size":50220},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.0.0_1768445123064_0.23054618188244436"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-15T02:45:23.205Z","publish_time":1768445123205,"_source_registry_name":"default","contributors":[]},"2.1.0":{"name":"better-result","version":"2.1.0","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"bin":{"better-result":"bin/cli.mjs"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","publish":"npm publish","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"dependencies":{"@clack/prompts":"^0.11.0"},"gitHead":"33d31bdd5ed6c1d9506fd1c802406c0ad987e112","_id":"better-result@2.1.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-POnegQjl5WgHVX4DmKarYSezjZ+iUmtSAtjtbVLpelay0NA6KbI41mOKnJYvy/i3P1NvmzsuZxDkXPuyAOYTuw==","shasum":"d0e7be6094b19273efded7a72ed39a969210fca9","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.1.0.tgz","fileCount":17,"unpackedSize":233850,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC9WXK8ljdTsHXh3fbmiiXXBR7Ucq1u42dlQYA6zhMJVgIgG4RuooQXZBS4g4n9u96D1IICon8NU6rN0lLPdAWPycE="}],"size":51825},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.1.0_1768519463717_0.2594925572382656"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-15T23:24:23.876Z","publish_time":1768519463876,"_source_registry_name":"default","contributors":[]},"2.2.0":{"name":"better-result","version":"2.2.0","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"bin":{"better-result":"bin/cli.mjs"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","publish":"npm publish","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"dependencies":{"@clack/prompts":"^0.11.0"},"gitHead":"549b78531aec6a383418ce7ed4ea0a6acbaf0bc8","_id":"better-result@2.2.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-jDIuhr3B02wnJWFD7yVZ4Bgj/7MHmcb7+G8XRDKgXCbwCz5IFNkppu9UA6JdtDmTHK1e6NsyUi9Zsw1belw8qw==","shasum":"643e89fe4baa91509566b4aa5283e60016aac12e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.2.0.tgz","fileCount":17,"unpackedSize":240333,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCD5x6s/3r9vpxwnIItj8M3AZTEtWIsOyoAV76p/8MVPgIhAPigKhK91aUHkqd82c9jqFYDKoxn6n4eu4uPaeoJ6LIF"}],"size":53390},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.2.0_1768669391479_0.42437955144501704"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-17T17:03:11.635Z","publish_time":1768669391635,"_source_registry_name":"default","contributors":[]},"2.3.0":{"name":"better-result","version":"2.3.0","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"bin":{"better-result":"bin/cli.mjs"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","publish":"npm publish","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"dependencies":{"@clack/prompts":"^0.11.0"},"gitHead":"d4e36f2e0097b83633ce4d365df9749116dc9f90","_id":"better-result@2.3.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-CqTRSRU41PbMlzsnXfcU1bmyxxHUJSIBjyM3EagGbqclxBdy7Om+FrY9x3ix9XR7WdsHIyZhBp67eY8m8JCiNQ==","shasum":"3826b1abb55e05a8285815b187e85d0c824d5aa6","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.3.0.tgz","fileCount":17,"unpackedSize":248287,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCO1qkYIclzoFSr27rrW+wMmKujQmGsDtd+Iu+rRfDF8QIgThjNHFwbY7+OXzPedoeOLed+LjR6AVoS4mXVrsNzxew="}],"size":54930},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.3.0_1768669712883_0.9703870308204896"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-17T17:08:33.049Z","publish_time":1768669713049,"_source_registry_name":"default","contributors":[]},"2.3.1":{"name":"better-result","version":"2.3.1","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"bin":{"better-result":"bin/cli.mjs"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","publish":"npm publish","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"dependencies":{"@clack/prompts":"^0.11.0"},"gitHead":"fb308eff04c74b1540e85b2ce3fa2618cc1ee034","_id":"better-result@2.3.1","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-OFxz9r3uP9LhJ009I4XvOLYmTGpW6AOCKyWUqjPTjUmALoOQLVc14pJeYIMIplNlDALr0wqlAhJy019dp54a/A==","shasum":"ad51090d9d58e44b748010f8b584b736ce9f1c3a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.3.1.tgz","fileCount":17,"unpackedSize":248324,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGLu/2K68sryiRzZa+kPNdq58/KWBlfLAfBP3pu3o6osAiAm1tJRxn27IHu1vli88jpl2y5GIen+jXPq5RA5nT8I3w=="}],"size":54942},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.3.1_1768789199243_0.29157792106667046"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-19T02:19:59.375Z","publish_time":1768789199375,"_source_registry_name":"default","contributors":[]},"2.4.0":{"name":"better-result","version":"2.4.0","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"bin":{"better-result":"bin/cli.mjs"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","publish":"npm publish","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"dependencies":{"@clack/prompts":"^0.11.0"},"gitHead":"e6e6323ad647323e2a2393723c23539ccf1f2dbe","_id":"better-result@2.4.0","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-3Bq6/OYwxo9G+ceoyG0j2MN/aVqOxi8VpL2ZyxkqEftNYqy0uQTRhWX2aTyBbC4jQjcfmnitCZ9/ZBFK9ABQpQ==","shasum":"4aebd5be97f2cc89699d8c8ca103489342649ef0","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.4.0.tgz","fileCount":17,"unpackedSize":257468,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCjGY66WNxJOJyPt6DRg0gBkme0eRnz9GSS4QajHRQ2jAIhAO/5+0ni+bqhaTawGawO98UyMD0UDuCJgdDpq+NiDSvt"}],"size":56997},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.4.0_1768873840541_0.0473938736842443"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-20T01:50:40.671Z","publish_time":1768873840671,"_source_registry_name":"default","contributors":[]},"2.5.0":{"name":"better-result","version":"2.5.0","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"bin":{"better-result":"bin/cli.mjs"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","publish":"npm publish","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"dependencies":{"@clack/prompts":"^0.11.0"},"gitHead":"cc26df5e22e694c37cd19cb75d7d6fa02415d119","_id":"better-result@2.5.0","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-wZ0wNGs9JQroKwRGApIIygIny9VVmxD8L0+Sriij+XSmLxjSlHadAkNqva34/tdfr/0QxE8RdM/5irngslHOTg==","shasum":"47f83aa694505339e7d4bc207db098185f42e05e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.5.0.tgz","fileCount":17,"unpackedSize":257739,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIERmcKuHAPRDlD/XQKrPuidK1nyZ+zm5RfsnpEyDXi9EAiEAiCn1sWqThpvndZa7IAGha5xrfqBaSLPAhalZrVvp2oE="}],"size":57015},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.5.0_1769002432859_0.2801315520845007"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-21T13:33:53.029Z","publish_time":1769002433029,"_source_registry_name":"default","contributors":[]},"2.5.1":{"name":"better-result","version":"2.5.1","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"bin":{"better-result":"bin/cli.mjs"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","publish":"npm publish","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"dependencies":{"@clack/prompts":"^0.11.0"},"gitHead":"5023409e9194501a772ea3d5d85606834590121a","_id":"better-result@2.5.1","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-guw/CpafxGh6QeRoc3H9KBxbynQfdouzPLysMAxyFl52mKQ8wa6SfuDLbWDdglPHca6GNA6DmBh4LdsmQlxSxA==","shasum":"8ea0419466d14eea6fe0717a688e677b12e72883","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.5.1.tgz","fileCount":17,"unpackedSize":257831,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDG26afQZsBgTwmqZL6rvuduNgveAFcLbo/P3iezjqOpgIgJhg9XVeg2ZjOrxw8YJ3lySH4Rfa62fyInMFfRFHXv7Y="}],"size":57037},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.5.1_1769051710541_0.4558955824924249"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-22T03:15:10.710Z","publish_time":1769051710710,"_source_registry_name":"default","contributors":[]},"2.5.2":{"name":"better-result","version":"2.5.2","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"bin":{"better-result":"bin/cli.mjs"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","publish":"npm publish","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"dependencies":{"@clack/prompts":"^0.11.0"},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"gitHead":"4ea656879fa73debc7174893dc26c150b55396f2","_id":"better-result@2.5.2","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-gHG++1y+GvCrGvSi1WVwyM3slsl1yeE68rNCuTXfwcCx041I3f1z2d99oaC6QSuP+XB70Vda3Dc+EitE5KfGqg==","shasum":"cc8f25888196b92032172870e2b351760e6187d3","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.5.2.tgz","fileCount":17,"unpackedSize":260212,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD7FQXecMqWlGw4OqZwc1pPDuja09w5sh5XlJ9M2nUo6gIgRuDOgGuAgVRpLauIkbzrJvypjj9vUW9zwGP6NjIWgg8="}],"size":57484},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.5.2_1769372381101_0.367960121446508"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-25T20:19:41.299Z","publish_time":1769372381299,"_source_registry_name":"default","contributors":[]},"2.6.0":{"name":"better-result","version":"2.6.0","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"bin":{"better-result":"bin/cli.mjs"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"dependencies":{"@clack/prompts":"^0.11.0"},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"gitHead":"1e56c994707257f2609044ddedd4b55ea283df1c","_id":"better-result@2.6.0","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-hv31uYHmjFf3zIJgj5V0mT2ZOUg8zDVfd6Pv0iKKGcEAtjukxJofNa0q91cft+YqwHBSQAld5i9zbwgI9alZnA==","shasum":"e26e88074c21341612820f33684a6bab1e3718b0","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.6.0.tgz","fileCount":17,"unpackedSize":266454,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDGtJO3SUajIZ5UDXX97EsYcNElwdPsGDEPXA8T4gOGoQIhAPN+b0Sys6BRM/goCtYRwotDWxtaFb6osq9OhEas4RBa"}],"size":58824},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.6.0_1769605508113_0.7162978117473369"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-28T13:05:08.246Z","publish_time":1769605508246,"_source_registry_name":"default","contributors":[]},"2.7.0":{"name":"better-result","version":"2.7.0","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"bin":{"better-result":"bin/cli.mjs"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"dependencies":{"@clack/prompts":"^0.11.0"},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"gitHead":"5806ed23516d23f4c876357bba1fdd502f3c11c8","_id":"better-result@2.7.0","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-7zrmXjAK8u8Z6SOe4R65XObOR5X+Y2I/VVku3t5cPOGQ8/WsBcfFmfnIPiEl5EBMDOzPHRwbiPbMtQBKYdw7RA==","shasum":"b68a76a335ffc8239573c265720073a8f241b44b","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.7.0.tgz","fileCount":17,"unpackedSize":273047,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDENNKOFioKutMqg8iFH5UH51OagYRDlHq6f3zZMV1zEAIhAM8O88rKJo8+opY5+fOyR9+jP6ZWpm4AiHLlSQowK28h"}],"size":60102},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.7.0_1769886728549_0.5268854925049673"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-31T19:12:08.708Z","publish_time":1769886728708,"_source_registry_name":"default","contributors":[]},"2.8.0":{"name":"better-result","version":"2.8.0","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"_id":"better-result@2.8.0","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-Zww6wBeN+KL+kmE4cHyY9uj5+9omtTzSyHwaoncLoti9XLKETpcAPehiSa5CGp4sRWDZbgbtS7x/Ci5U77Tqyg==","shasum":"85fb1e0ddc3beaadc192488ab67f4a29d588ef62","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.8.0.tgz","fileCount":18,"unpackedSize":305315,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCp9lMJFFCCEWvA4nMXNWAGeoetkaIRHYe+KGtv/QmGZAIhAN6IiFUcPR34HjfQ6zGv925sT7MJKGKkwI11vQ8AS1zN"}],"size":63311},"_npmUser":{"name":"anonymous","email":"dillon.mulroy@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.8.0_1775437517426_0.6557007354906963"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-04-06T01:05:17.576Z","publish_time":1775437517576,"_source_registry_name":"default","contributors":[]},"2.8.1":{"name":"better-result","version":"2.8.1","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://github.com/dmmulroy/better-result#readme","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"gitHead":"678477872d69fba3dd80b9b8ac47100e82846835","_id":"better-result@2.8.1","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-C4FQ1gCLz1YCxmM8HhNPb4D7WQmdrdllkhNReeLwvIVtJKQFKKfwJwmM3yZEBG4P34cLtrgB+FEPr1u553hF7Q==","shasum":"e083298985f7167f57a4a210835fa7afcd700eba","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.8.1.tgz","fileCount":5,"unpackedSize":75939,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/better-result@2.8.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDy87t6DLzRb+seBCLIMXdyDHE/nElJSBFpNMgH0eSFkQIhALj2odmLmL1/CZ9wjToCWWSrm2wmRp8La24Rs8MfKZ9l"}],"size":16983},"_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1f306463-1150-4e92-b6c5-451ee5e5eaf7"}},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.8.1_1775479410324_0.3269115528584907"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-04-06T12:43:30.465Z","publish_time":1775479410465,"_source_registry_name":"default","contributors":[]},"2.8.2":{"name":"better-result","version":"2.8.2","description":"Lightweight Result type with generator-based composition","keywords":["error-handling","functional","generator","result","typescript"],"homepage":"https://better-result.dev","bugs":{"url":"https://github.com/dmmulroy/better-result/issues"},"license":"MIT","author":{"name":"Dillon Mulroy","email":"dillon.mulroy@gmail.com","url":"https://github.com/dmmulroy"},"repository":{"type":"git","url":"git+https://github.com/dmmulroy/better-result.git"},"type":"module","main":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs","default":"./dist/index.mjs"}},"scripts":{"build":"tsdown","prepublishOnly":"bun run build","test":"bun test src/","check":"tsc --noEmit","lint":"oxlint .","fmt":"oxfmt .","fmt:check":"oxfmt --check ."},"devDependencies":{"@types/bun":"latest","oxfmt":"^0.23.0","oxlint":"^1.38.0","tsdown":"^0.19.0-beta.5","typescript":"^5.0.0"},"gitHead":"b3a4a2a087d4fcc13eb1432eeefc6999e2b8adc6","_id":"better-result@2.8.2","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-YOf0VSj5nUPI27doTtXF+BBnsiRq3qY7avHqfIWnppxTLGyvkLq1QV2RTxkwoZwJ60ywLfZ0raFF4J/G886i7A==","shasum":"f14400741cf3a0afb07258c827d4653c121febe8","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/better-result/-/better-result-2.8.2.tgz","fileCount":5,"unpackedSize":59859,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/better-result@2.8.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDxNu+7MHkKrKQE6olp6FVatNDkn+yX8xgX0IWInvOpEQIhAO9i7QQUBOCiXfD1nyTx0GXHMYewbLbWnUsLOG5DJ9B4"}],"size":15219},"_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1f306463-1150-4e92-b6c5-451ee5e5eaf7"}},"directories":{},"maintainers":[{"name":"anonymous","email":"dillon.mulroy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/better-result_2.8.2_1775673937111_0.5472014012549682"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-04-08T18:45:37.259Z","publish_time":1775673937259,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"2.8.2"},"name":"better-result","time":{"created":"2026-01-09T15:31:49.436Z","modified":"2026-04-08T18:45:51.088Z","1.0.0":"2026-01-09T15:31:30.912Z","1.0.1":"2026-01-14T05:46:20.565Z","2.0.0":"2026-01-15T02:45:23.205Z","2.1.0":"2026-01-15T23:24:23.876Z","2.2.0":"2026-01-17T17:03:11.635Z","2.3.0":"2026-01-17T17:08:33.049Z","2.3.1":"2026-01-19T02:19:59.375Z","2.4.0":"2026-01-20T01:50:40.671Z","2.5.0":"2026-01-21T13:33:53.029Z","2.5.1":"2026-01-22T03:15:10.710Z","2.5.2":"2026-01-25T20:19:41.299Z","2.6.0":"2026-01-28T13:05:08.246Z","2.7.0":"2026-01-31T19:12:08.708Z","2.8.0":"2026-04-06T01:05:17.576Z","2.8.1":"2026-04-06T12:43:30.465Z","2.8.2":"2026-04-08T18:45:37.259Z"},"readme":"# better-result\n\nLightweight Result type for TypeScript with generator-based composition.\n\n📖 **[Documentation](https://better-result.dev/core/creating-results)**\n\n## Install\n\n```sh\nnpm install better-result\n```\n\nOr with Bun / pnpm:\n\n```sh\nbun add better-result\npnpm add better-result\n```\n\n## Quick Start\n\n```ts\nimport { Result } from \"better-result\";\n\n// Wrap throwing functions\nconst parsed = Result.try(() => JSON.parse(input));\n\n// Check and use\nif (Result.isOk(parsed)) {\n  console.log(parsed.value);\n} else {\n  console.error(parsed.error);\n}\n\n// Or use pattern matching\nconst message = parsed.match({\n  ok: (data) => `Got: ${data.name}`,\n  err: (e) => `Failed: ${e.message}`,\n});\n```\n\n## Contents\n\n- [Creating Results](#creating-results)\n- [Transforming Results](#transforming-results)\n- [Handling Errors](#handling-errors)\n- [Observing Results](#observing-results)\n- [Extracting Values](#extracting-values)\n- [Generator Composition](#generator-composition)\n- [Retry Support](#retry-support)\n- [UnhandledException](#unhandledexception)\n- [Panic](#panic)\n- [Tagged Errors](#tagged-errors)\n- [Serialization](#serialization)\n- [API Reference](#api-reference)\n- [Agents & AI](#agents--ai)\n\n## Creating Results\n\n```ts\n// Success\nconst ok = Result.ok(42);\n\n// Error\nconst err = Result.err(new Error(\"failed\"));\n\n// From throwing function\nconst result = Result.try(() => riskyOperation());\n\n// From promise\nconst result = await Result.tryPromise(() => fetch(url));\n\n// With custom error handling\nconst result = Result.try({\n  try: () => JSON.parse(input),\n  catch: (e) => new ParseError(e),\n});\n```\n\n## Transforming Results\n\n```ts\nconst result = Result.ok(2)\n  .map((x) => x * 2) // Ok(4)\n  .andThen(\n    (\n      x, // Chain Result-returning functions\n    ) => (x > 0 ? Result.ok(x) : Result.err(\"negative\")),\n  );\n\n// Standalone functions (data-first or data-last)\nResult.map(result, (x) => x + 1);\nResult.map((x) => x + 1)(result); // Pipeable\n```\n\n## Handling Errors\n\n```ts\n// Transform error type\nconst result = fetchUser(id).mapError((e) => new AppError(`Failed to fetch user: ${e.message}`));\n\n// Recover from specific errors while preserving the same success type\nconst result = fetchUser(id).tryRecover((e) =>\n  e._tag === \"NotFoundError\" ? Result.ok(defaultUser) : Result.err(e),\n);\n\n// Async recovery follows the same pattern\n// If fetchUser is async and returns Promise<Result<User, E>>, await it first.\nconst result = await (\n  await fetchUser(id)\n).tryRecoverAsync(async (e) =>\n  e._tag === \"NetworkError\" ? Result.ok(await readUserFromCache(id)) : Result.err(e),\n);\n```\n\n## Observing Results\n\nUse `tap` / `tapAsync` for success-side logging or tracing, `tapError` / `tapErrorAsync` for error-side logging or tracing, and `tapBoth` / `tapBothAsync` when you want to observe either branch with one handler object. These methods do not transform the `Result` — they always return the original value unchanged.\n\n```ts\nconst result = Result.try(() => JSON.parse(input))\n  .tap((value) => {\n    console.debug(\"parsed payload\", value);\n  })\n  .tapError((error) => {\n    console.error(\"failed to parse payload\", error);\n  });\n```\n\nIf you want to observe both branches symmetrically with one call, use `tapBoth`:\n\n```ts\nconst result = Result.try(() => JSON.parse(input)).tapBoth({\n  ok: (value) => {\n    console.info(\"decoded payload\", value);\n  },\n  err: (error) => {\n    console.warn(\"decode failed\", error);\n  },\n});\n```\n\nAsync side effects follow the same pattern:\n\n```ts\nconst result = await Result.err(\"request failed\").tapErrorAsync(async (error) => {\n  await trace(\"request.failed\", { error });\n});\n```\n\n`tapBothAsync` works the same way for async observers on either branch:\n\n```ts\nconst observed = await Result.tapBothAsync(\n  Result.try(() => JSON.parse(input)),\n  {\n    ok: async (value) => {\n      await trace(\"payload.decoded\", { value });\n    },\n    err: async (error) => {\n      await trace(\"payload.decode_failed\", { error });\n    },\n  },\n);\n```\n\nStatic helpers support both data-first and data-last styles:\n\n```ts\nconst traced = Result.tapError(Result.err(\"cache miss\"), (error) => {\n  console.warn(\"cache lookup failed\", error);\n});\n\nconst traceError = Result.tapErrorAsync(async (error: string) => {\n  await trace(\"cache.lookup_failed\", { error });\n});\n\nawait traceError(Result.err(\"cache miss\"));\n```\n\nIf you prefer, you can still observe both branches by chaining `tap` and `tapError` separately.\n\nThrown or rejected side-effect callbacks become `Panic`, just like other Result callbacks.\n\n## Extracting Values\n\n```ts\n// Unwrap (throws on Err)\nconst value = result.unwrap();\nconst value = result.unwrap(\"custom error message\");\n\n// With fallback\nconst value = result.unwrapOr(defaultValue);\n\n// Pattern match\nconst value = result.match({\n  ok: (v) => v,\n  err: (e) => fallback,\n});\n```\n\n## Generator Composition\n\nChain multiple Results without nested callbacks or early returns:\n\n```ts\nconst result = Result.gen(function* () {\n  const a = yield* parseNumber(inputA); // Unwraps or short-circuits\n  const b = yield* parseNumber(inputB);\n  const c = yield* divide(a, b);\n  return Result.ok(c);\n});\n// Result<number, ParseError | DivisionError>\n```\n\nAsync version with `Result.await`:\n\n```ts\nconst result = await Result.gen(async function* () {\n  const user = yield* Result.await(fetchUser(id));\n  const posts = yield* Result.await(fetchPosts(user.id));\n  return Result.ok({ user, posts });\n});\n```\n\nErrors from all yielded Results are automatically collected into the final error union type.\n\n### Normalizing Error Types\n\nUse `mapError` on the output of `Result.gen()` to unify multiple error types into a single type:\n\n```ts\nclass ParseError extends TaggedError(\"ParseError\")<{ message: string }>() {}\nclass ValidationError extends TaggedError(\"ValidationError\")<{ message: string }>() {}\nclass AppError extends TaggedError(\"AppError\")<{ source: string; message: string }>() {}\n\nconst result = Result.gen(function* () {\n  const parsed = yield* parseInput(input); // Err: ParseError\n  const valid = yield* validate(parsed); // Err: ValidationError\n  return Result.ok(valid);\n}).mapError((e): AppError => new AppError({ source: e._tag, message: e.message }));\n// Result<ValidatedData, AppError> - error union normalized to single type\n```\n\n## Retry Support\n\n```ts\nconst result = await Result.tryPromise(() => fetch(url), {\n  retry: {\n    times: 3,\n    delayMs: 100,\n    backoff: \"exponential\", // or \"linear\" | \"constant\"\n  },\n});\n```\n\n### Conditional Retry\n\nRetry only for specific error types using `shouldRetry`:\n\n```ts\nclass NetworkError extends TaggedError(\"NetworkError\")<{ message: string }>() {}\nclass ValidationError extends TaggedError(\"ValidationError\")<{ message: string }>() {}\n\nconst result = await Result.tryPromise(\n  {\n    try: () => fetchData(url),\n    catch: (e) =>\n      e instanceof TypeError // Network failures often throw TypeError\n        ? new NetworkError({ message: (e as Error).message })\n        : new ValidationError({ message: String(e) }),\n  },\n  {\n    retry: {\n      times: 3,\n      delayMs: 100,\n      backoff: \"exponential\",\n      shouldRetry: (e) => e._tag === \"NetworkError\", // Only retry network errors\n    },\n  },\n);\n```\n\n### Async Retry Decisions\n\nFor retry decisions that require async operations (rate limits, feature flags, etc.), enrich the error in the `catch` handler instead of making `shouldRetry` async:\n\n```ts\nclass ApiError extends TaggedError(\"ApiError\")<{\n  message: string;\n  rateLimited: boolean;\n}>() {}\n\nconst result = await Result.tryPromise(\n  {\n    try: () => callApi(url),\n    catch: async (e) => {\n      // Fetch async state in catch handler\n      const retryAfter = await redis.get(`ratelimit:${userId}`);\n      return new ApiError({\n        message: (e as Error).message,\n        rateLimited: retryAfter !== null,\n      });\n    },\n  },\n  {\n    retry: {\n      times: 3,\n      delayMs: 100,\n      backoff: \"exponential\",\n      shouldRetry: (e) => !e.rateLimited, // Sync predicate uses enriched error\n    },\n  },\n);\n```\n\n## UnhandledException\n\nWhen `Result.try()` or `Result.tryPromise()` catches an exception without a custom handler, the error type is `UnhandledException`:\n\n```ts\nimport { Result, UnhandledException } from \"better-result\";\n\n// Automatic — error type is UnhandledException\nconst result = Result.try(() => JSON.parse(input));\n//    ^? Result<unknown, UnhandledException>\n\n// Custom handler — you control the error type\nconst result = Result.try({\n  try: () => JSON.parse(input),\n  catch: (e) => new ParseError(e),\n});\n//    ^? Result<unknown, ParseError>\n\n// Same for async\nawait Result.tryPromise(() => fetch(url));\n//    ^? Promise<Result<Response, UnhandledException>>\n```\n\nAccess the original exception via `.cause`:\n\n```ts\nif (Result.isError(result)) {\n  const original = result.error.cause;\n  if (original instanceof SyntaxError) {\n    // Handle JSON parse error\n  }\n}\n```\n\n## Panic\n\nThrown (not returned) when user callbacks throw inside Result operations. Represents a defect in your code, not a domain error.\n\n```ts\nimport { Panic, isPanic } from \"better-result\";\n\n// Callback throws → Panic\nResult.ok(1).map(() => {\n  throw new Error(\"bug\");\n}); // throws Panic\n\n// Generator cleanup throws → Panic\nResult.gen(function* () {\n  try {\n    yield* Result.err(\"expected failure\");\n  } finally {\n    throw new Error(\"cleanup bug\");\n  }\n}); // throws Panic\n\n// Catch handler throws → Panic\nResult.try({\n  try: () => riskyOp(),\n  catch: () => {\n    throw new Error(\"bug in handler\");\n  },\n}); // throws Panic\n\n// Catching Panic (for error reporting)\ntry {\n  result.map(() => {\n    throw new Error(\"bug\");\n  });\n} catch (error) {\n  if (isPanic(error)) {\n    // isPanic() is a type guard function\n    console.error(\"Defect:\", error.message, error.cause);\n  }\n\n  if (Panic.is(error)) {\n    // Panic.is() is a static method (same behavior)\n  }\n\n  if (error instanceof Panic) {\n    // instanceof works too\n  }\n}\n```\n\n**Why Panic?** `Err` is for recoverable domain errors. Panic is for bugs — like Rust's `panic!()`. If your `.map()` callback throws, that's not an error to handle, it's a defect to fix. Returning `Err` would collapse type safety (`Result<T, E>` becomes `Result<T, E | unknown>`).\n\n**Panic properties:**\n\n| Property  | Type      | Description                   |\n| --------- | --------- | ----------------------------- |\n| `message` | `string`  | Describes where/what panicked |\n| `cause`   | `unknown` | The exception that was thrown |\n\nPanic also provides `toJSON()` for error reporting services (Sentry, etc.).\n\n## Tagged Errors\n\nBuild exhaustive error handling with discriminated unions:\n\n```ts\nimport { TaggedError, matchError, matchErrorPartial } from \"better-result\";\n\n// Factory API: TaggedError(\"Tag\")<Props>()\nclass NotFoundError extends TaggedError(\"NotFoundError\")<{\n  id: string;\n  message: string;\n}>() {}\n\nclass ValidationError extends TaggedError(\"ValidationError\")<{\n  field: string;\n  message: string;\n}>() {}\n\ntype AppError = NotFoundError | ValidationError;\n\n// Create errors with object args\nconst err = new NotFoundError({ id: \"123\", message: \"User not found\" });\n\n// Exhaustive matching\nmatchError(error, {\n  NotFoundError: (e) => `Missing: ${e.id}`,\n  ValidationError: (e) => `Bad field: ${e.field}`,\n});\n\n// Partial matching with fallback\nmatchErrorPartial(\n  error,\n  { NotFoundError: (e) => `Missing: ${e.id}` },\n  (e) => `Unknown: ${e.message}`,\n);\n\n// Type guards\nTaggedError.is(value); // any tagged error\nNotFoundError.is(value); // specific class\n```\n\nFor errors with computed messages, add a custom constructor:\n\n```ts\nclass NetworkError extends TaggedError(\"NetworkError\")<{\n  url: string;\n  status: number;\n  message: string;\n}>() {\n  constructor(args: { url: string; status: number }) {\n    super({ ...args, message: `Request to ${args.url} failed: ${args.status}` });\n  }\n}\n\nnew NetworkError({ url: \"/api\", status: 404 });\n```\n\n## Serialization\n\nConvert Results to plain objects for RPC, storage, or server actions:\n\n```ts\nimport { Result, SerializedResult, ResultDeserializationError } from \"better-result\";\n\n// Serialize to plain object\nconst result = Result.ok(42);\nconst serialized = Result.serialize(result);\n// { status: \"ok\", value: 42 }\n\n// Deserialize back to Result instance\nconst deserialized = Result.deserialize<number, never>(serialized);\n// Ok(42) - can use .map(), .andThen(), etc.\n\n// Invalid input returns ResultDeserializationError\nconst invalid = Result.deserialize({ foo: \"bar\" });\nif (Result.isError(invalid) && ResultDeserializationError.is(invalid.error)) {\n  console.log(\"Bad input:\", invalid.error.value);\n}\n\n// Typed boundary for Next.js server actions\nasync function createUser(data: FormData): Promise<SerializedResult<User, ValidationError>> {\n  const result = await validateAndCreate(data);\n  return Result.serialize(result);\n}\n\n// Client-side\nconst serialized = await createUser(formData);\nconst result = Result.deserialize<User, ValidationError>(serialized);\n```\n\n## API Reference\n\n### Result\n\n| Method                                  | Description                                                                              |\n| --------------------------------------- | ---------------------------------------------------------------------------------------- |\n| `Result.ok(value)`                      | Create success                                                                           |\n| `Result.err(error)`                     | Create error                                                                             |\n| `Result.try(fn)`                        | Wrap throwing function                                                                   |\n| `Result.tryPromise(fn, config?)`        | Wrap async function with optional retry                                                  |\n| `Result.isOk(result)`                   | Type guard for Ok                                                                        |\n| `Result.isError(result)`                | Type guard for Err                                                                       |\n| `Result.gen(fn)`                        | Generator composition                                                                    |\n| `Result.tryRecover(result, fn)`         | Recover error into same success type                                                     |\n| `Result.tryRecoverAsync(result, fn)`    | Async recover error into same success type                                               |\n| `Result.tap(result, fn)`                | Run side effect on success and return original result                                    |\n| `Result.tapAsync(result, fn)`           | Run async side effect on success and return original result                              |\n| `Result.tapError(result, fn)`           | Run side effect on error and return original result                                      |\n| `Result.tapErrorAsync(result, fn)`      | Run async side effect on error and return original result                                |\n| `Result.tapBoth(result, handlers)`      | Run side effect on either branch and return original result                              |\n| `Result.tapBothAsync(result, handlers)` | Run async side effect on either branch and return original result                        |\n| `Result.await(promise)`                 | Wrap Promise<Result> for generators                                                      |\n| `Result.serialize(result)`              | Convert Result to plain object                                                           |\n| `Result.deserialize(value)`             | Rehydrate serialized Result (returns `Err<ResultDeserializationError>` on invalid input) |\n| `Result.partition(results)`             | Split array into [okValues, errValues]                                                   |\n| `Result.flatten(result)`                | Flatten nested Result                                                                    |\n\n### Instance Methods\n\n| Method                    | Description                                |\n| ------------------------- | ------------------------------------------ |\n| `.isOk()`                 | Type guard, narrows to Ok                  |\n| `.isErr()`                | Type guard, narrows to Err                 |\n| `.map(fn)`                | Transform success value                    |\n| `.mapError(fn)`           | Transform error value                      |\n| `.tryRecover(fn)`         | Recover error into same success type       |\n| `.tryRecoverAsync(fn)`    | Async recover error into same success type |\n| `.andThen(fn)`            | Chain Result-returning function            |\n| `.andThenAsync(fn)`       | Chain async Result-returning function      |\n| `.match({ ok, err })`     | Pattern match                              |\n| `.unwrap(message?)`       | Extract value or throw                     |\n| `.unwrapOr(fallback)`     | Extract value or return fallback           |\n| `.tap(fn)`                | Side effect on success                     |\n| `.tapAsync(fn)`           | Async side effect on success               |\n| `.tapError(fn)`           | Side effect on error                       |\n| `.tapErrorAsync(fn)`      | Async side effect on error                 |\n| `.tapBoth(handlers)`      | Side effect on either branch               |\n| `.tapBothAsync(handlers)` | Async side effect on either branch         |\n\n### TaggedError\n\n| Method                                 | Description                        |\n| -------------------------------------- | ---------------------------------- |\n| `TaggedError(tag)<Props>()`            | Factory for tagged error class     |\n| `TaggedError.is(value)`                | Type guard for any TaggedError     |\n| `matchError(err, handlers)`            | Exhaustive pattern match by `_tag` |\n| `matchErrorPartial(err, handlers, fb)` | Partial match with fallback        |\n| `isTaggedError(value)`                 | Type guard (standalone function)   |\n| `panic(message, cause?)`               | Throw unrecoverable Panic          |\n| `isPanic(value)`                       | Type guard for Panic               |\n\n### Type Helpers\n\n| Type                     | Description                  |\n| ------------------------ | ---------------------------- |\n| `InferOk<R>`             | Extract Ok type from Result  |\n| `InferErr<R>`            | Extract Err type from Result |\n| `SerializedResult<T, E>` | Plain object form of Result  |\n| `SerializedOk<T>`        | Plain object form of Ok      |\n| `SerializedErr<E>`       | Plain object form of Err     |\n\n## Agents & AI\n\nbetter-result ships with portable `SKILL.md` skills instead of an interactive CLI.\n\n### Available skills\n\n- `better-result-adopt` — adopt `better-result` in an existing codebase\n- `better-result-migrate-v2` — migrate v1 `TaggedError` usage to the v2 API\n\nThese skills are designed to work with SKILL.md-compatible agents and skills.sh-compatible tooling.\n\n### Install with skills.sh-compatible tooling\n\n```sh\nnpx skills add dmmulroy/better-result@better-result-adopt\nnpx skills add dmmulroy/better-result@better-result-migrate-v2\n```\n\nTo install globally without prompts:\n\n```sh\nnpx skills add dmmulroy/better-result@better-result-adopt -g -y\n```\n\n### Manual installation\n\nIf your agent does not support skills.sh installation, copy one of these directories into the agent's skills folder:\n\n- `skills/better-result-adopt/`\n- `skills/better-result-migrate-v2/`\n\n### What the skills do\n\n`better-result-adopt` guides an agent through:\n\n- converting try/catch to `Result.try` / `Result.tryPromise`\n- defining `TaggedError` classes for domain errors\n- refactoring nested error handling into `Result.gen`\n- replacing nullable or sentinel error returns with `Result`\n\n`better-result-migrate-v2` guides an agent through:\n\n- migrating `TaggedError` classes from v1 to v2 factory syntax\n- updating constructor call sites to the new object form\n- replacing `TaggedError.match*` helpers with standalone helpers\n- updating imports and verifying no old API usages remain\n\n### Optional source context\n\nFor richer AI context in a consuming project:\n\n```sh\nnpx opensrc better-result\n```\n\nSee [skills/README.md](skills/README.md) for a concise skill-install reference.\n\n## License\n\nMIT","users":{}}