{"_id":"@danthegoodman/result-ts","_rev":"16-e0669aaac09c4c9b652064768ce4b013","name":"@danthegoodman/result-ts","dist-tags":{"latest":"0.3.3"},"versions":{"0.0.1":{"name":"@danthegoodman/result-ts","version":"0.0.1","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.0.1","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"9a04a808958bd9fe542564c408be48fb5abbdf2d","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.0.1.tgz","fileCount":8,"integrity":"sha512-GL7UAnexYb+xU25jh70f64f7NXRB9zYEZrRipY8f2hNPT5s21ONa60BmwCmZaFLs74FD6z4Qt+JV5cfdxzr8kA==","signatures":[{"sig":"MEUCIQDKi7/IOKt5RyoP94Bc0SUMVjP4RER/maMIU5PcmqQTzwIgBr0UZoooH1wyzhVOqTOdFAaiMc7kjSROKWI7oy+pmdw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16219},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"0b9054b47b978ee78ea9cf04184e31307eedf1b2","scripts":{"dev":"tsx watch src/index.ts","test":"vitest","build":"tsc","start":"node dist/index.js","publish":"npm publish --access public","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style Result type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.0.1_1752515187579_0.4139316614080546","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@danthegoodman/result-ts","version":"0.0.2","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.0.2","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"1d6402c9d075a6747edbb137110e97890b11f2d8","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.0.2.tgz","fileCount":8,"integrity":"sha512-Jj+eQP3ltaIfiIzZxJwY3DihjVlrkS5UswMHvnDDMWqYBjPxqmFtm9+dRXUu8UmusE/CiIUj7Pssy+Kyc/Dy9A==","signatures":[{"sig":"MEQCIHUJx+PHF8smoh6KEHo3iXr3XDOm72/Yv/2HdG0GTXIPAiBtiFudeaLcMxIwXahKVVLh8OTH7GXPkJIIsJEaodrgVw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17201},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"9612412e48f90b253963e86f60e7a79d7e3626d5","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style Result type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.0.2_1752515473748_0.8214148984391274","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@danthegoodman/result-ts","version":"0.0.3","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.0.3","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"f8d4f0f917b0e65c521c9786c7027e59dc10b7b6","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.0.3.tgz","fileCount":8,"integrity":"sha512-W0UMdxI9Ec3LIQ2MqAPCb7mL00yU5vp3OS3OpzFkXkT6S7iCJ/XN42pLWrIXXwBrGBp0mjc8sf6yp7yp2SLQ+g==","signatures":[{"sig":"MEYCIQDNcZn9TAGTRrk15pwOdRwG1+ZU92gdy7rNn4GUBSV48gIhAPoPla9lmXLklhFulB9lymO9UkrAddyFAUQUykgf2ic+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18023},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"5c1e129488899c062aaa238db7ed54c3314e3642","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style Result type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.0.3_1752515916216_0.430655998244569","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@danthegoodman/result-ts","version":"0.1.0","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.1.0","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"7c15ee9cd8d895448eb534e9c9242bec7e4f6f26","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.1.0.tgz","fileCount":8,"integrity":"sha512-6o6Ojj5/ufqWGInMJ5yg9Q1/YGT2FRgzvJAJQsVavm96+MXgyiNUA5nJZH+MQii2qgNu9RSwOyEFivmg7CdiMA==","signatures":[{"sig":"MEUCIQCFk1/AKzOccr6HOq8enyvzoSxeapudHl+1LB4EZkU9IwIgWEx+UgU+2phAO1UJXLGJbpNXN1dAzJ/pffOQHe8pBOs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24118},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"995ab2773c873cb375a5854347821e56aa6acade","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.1.0_1766253235318_0.741477557342701","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@danthegoodman/result-ts","version":"0.1.1","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.1.1","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"a11e6482f66ec427817f765e2c25dd0bbdb6ee5b","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.1.1.tgz","fileCount":8,"integrity":"sha512-zs7HGoEDi24sufc3PX7vjuGDOZoAEkCb8NgMzQVqTONTVpXTV+Xto6pOUmny0no5GVbvnXBmkufLqXYOp8lYcA==","signatures":[{"sig":"MEUCIQDY0R111Dn2EtI2TxZzssyTpmfxv8m473zHqE3n2XhfAQIgH3EWuaQk47VN66An5H9UGppgwiuWnwvZXUQ+Q5LkRLA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27418},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"4512867375a15a9b15bbc6db2a85ce9219c4b8bd","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.1.1_1766253559982_0.9367613478584127","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@danthegoodman/result-ts","version":"0.1.2","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.1.2","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"e0652080bd53473a6e00c32ccddc946d3cbc6d36","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.1.2.tgz","fileCount":8,"integrity":"sha512-3TgLPt82OauGW6jYnAw4huslvIXnXrwFbe2K0WLu/AjGN8o/+Yl3v7HX3UH+ajnCkP9KnPKZgdkGTxpjyNZr4g==","signatures":[{"sig":"MEUCICntGQGmMUivDz8vFBCCpS2FaOM3ps7lv/WAmP+xXem7AiEAj8Lb9OGCi5DL2ADqkGU/Gl7aIMeKqK1ClQZsivvpxgw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28465},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"7c3c75ac8378e736264791d5492b870d5af59f59","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.1.2_1766760787966_0.4056595677231811","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@danthegoodman/result-ts","version":"0.1.3","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.1.3","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"97b005ae31866f1079e1b88bc73726857704f775","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.1.3.tgz","fileCount":8,"integrity":"sha512-8c3mKrlablWUjKSXb4Rl9TTZkO53saIiOm8p1bo8vS4jvU5fOSEeHiPsvuDMEqSlUmv4HMDwGeNKTDfFgW9vNQ==","signatures":[{"sig":"MEQCIFj+KxlCrViL+nbF7OCq3z280mrsKqbQuc7TRRAG0608AiA9v2A/F6iMJHZoaBQp1wiptCWR52CC/PPLmzztbtSmpA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29655},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"7c3c75ac8378e736264791d5492b870d5af59f59","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.1.3_1766762630970_0.9878344504940657","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@danthegoodman/result-ts","version":"0.1.4","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.1.4","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"9d671a5ce202f9e34e8b4d07f3cbf44e3e08473c","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.1.4.tgz","fileCount":8,"integrity":"sha512-Pr/ZNaLhvYzd/V8SSUSUeUTU6gtbASYkRBWLXjF7RVxDWFxp7hQa0DkpC55kRWlVmoxokMzoeOQlX1AYVSNW1A==","signatures":[{"sig":"MEUCIQCdcWzrA20OtC6KRC+hijX2BaJfbahT+SLsiYoRPykRCAIgdskRfqNuZnUuSguL90+qafvQYckIEtDOzf+ETcpM3ew=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30289},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3ead0065bc38bf37fdc348da26939f98c6788dc4","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.1.4_1766765094008_0.29791259431895023","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@danthegoodman/result-ts","version":"0.1.5","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.1.5","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"fdd74b81485117f4368a75060dac080dbc672eb3","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.1.5.tgz","fileCount":8,"integrity":"sha512-nlEwDotwdHO/AYyH24z5Vtk1KDhb/qyC8gDrQ2kFD0QAavukXlCJTMQkNB8YUgoMxZjQaHSzN03oLbWMnrVknQ==","signatures":[{"sig":"MEQCIBo6JJB911uOdLdcLi1ysX3LIpOBTKAeKX1H51GFTe4rAiA+liS7fDQwd8nQyjbgu3jQa7g6pTVNaF2cONmNXxf40Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30369},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3152fe0786b6b5ba196b5ba35469543373891fff","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.1.5_1767104469801_0.9557957552947831","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@danthegoodman/result-ts","version":"0.2.0","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.2.0","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"0d2cb130e9fcbcac535a8729c5de0d9fd8ffd810","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.2.0.tgz","fileCount":8,"integrity":"sha512-pMgHBOqHWmqtEbuqVnSDBQUBkj8hiud9ZhMkJLc5K/TcnpzCDY1WB78l8hbMimnMV5F39+k4e9NeqbmP7/ZrFg==","signatures":[{"sig":"MEUCIHNCIgAxSWo2sZhvYTqeK9HnHslrvLdTFwt/7IT1SQHtAiEAsT7aOEof+hjtpsUpMp6wP71cvEBSZNLNgoO23RCynTs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30552},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"a9368664d7a0eb3b9afaf289d38b9cf6fbb8ad7a","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.2.0_1767218239297_0.5141439976155109","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@danthegoodman/result-ts","version":"0.2.1","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.2.1","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"af0d8e7d56374b005c849a23a05c3ff610a90633","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.2.1.tgz","fileCount":8,"integrity":"sha512-O7lp9VejR/YYSK7jGxQaQ/wFdcoy0LG4ri41uKLMgCaz5pKhTIxVz5OQvb/HxDn44r4dlsft1R3DLYsFakdbPA==","signatures":[{"sig":"MEYCIQCsiRCneEzyHwElbNQ8SoKYLTyERVbPTGjhH5/hpOIcYQIhANAN0SPX+/A004YGySOD3nXWj+8snaDxN7Zz80Y5jN2I","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30554},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"672f288c29e6f10dce28fd97f395a993b3425d82","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.2.1_1767219201344_0.7261882346162887","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@danthegoodman/result-ts","version":"0.2.2","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.2.2","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"4a49d9f6e5f3315420abf19c7b4b06204782415e","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.2.2.tgz","fileCount":8,"integrity":"sha512-0QtD9qoHzDto4vuOVqPoxfwf/uzAOveK7/CFjvkGOwErTyFBOTnlrGxnMY4CE875Om1PHg7TY2V020AMaxAONA==","signatures":[{"sig":"MEQCIG1TBKKucSJQEYi7yyKG1u87l74H45bHqiUGafQ6L4+PAiBgIKNBKjmd59yTnjVO3+HTJwWxf+5yctI0QLkg0o2VFQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30554},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"77616d604cd7892508b32f4c6012e0405a74e62c","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.2.2_1767219433397_0.05860326981575348","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@danthegoodman/result-ts","version":"0.3.0","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.3.0","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"c8def0656eea9140a3249171bf2ea27d172bab03","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.3.0.tgz","fileCount":8,"integrity":"sha512-8gJlbZ+FJBBMYcTJ4uHtUM6WLIRsT1c/zzpkbMn5Cb3nFKQYVvv+1TmNtPMBFKBkXsUJjZyP+IXkEmOjugHqjw==","signatures":[{"sig":"MEUCIQDsRyr9hbtfxAajWgvNFJpuZMXY16ia2tJq0bDHdxvgIwIgGmgrkrt7gB1QRNNZX0LMgF6rxNIJMm6LB2joovPbAiY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35163},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"226d30d7647b4acd50f3d3ccbdf54d49c7d33aec","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.3.0_1767273015984_0.2072930653650651","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@danthegoodman/result-ts","version":"0.3.1","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.3.1","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"a36ff38213f9943665b7f4747f95edf3303ad7c8","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.3.1.tgz","fileCount":8,"integrity":"sha512-4dfQiR4MjQ9oG79aUP8z+0dqxZJfFpyYUDVOOa3t5+KpHJxdRVGsFs/8NMOoe6Mtd53AltF+NDvsHBeESjRAIg==","signatures":[{"sig":"MEUCIQCddGAlUmdhJQp7wdhHsnfOYAvThXHlxdegGaVviheTXAIgTwoo5h0VAcnnF3QXqewkh+NeZEE/1LEMBGggaEACJds=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35911},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f486e097bd56635fc7cc3ac832abd7146ab8b305","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.3.1_1767273463616_0.8087942404030402","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@danthegoodman/result-ts","version":"0.3.2","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"author":{"name":"danthegoodman1"},"license":"ISC","_id":"@danthegoodman/result-ts@0.3.2","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"dist":{"shasum":"71dc44664a46a58a92faee7e38120963ca98a881","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.3.2.tgz","fileCount":8,"integrity":"sha512-s8kLuLSXsFofUReUaO90+9Nfxh9B7m7C+yh6te6maKoGvgn4UrZ0ourVKim9S5tYaJI5QYaab+MzMVZ8XKaD3A==","signatures":[{"sig":"MEUCIAx9iB8mbcgesX5c8n8e9lWzclGsJ1aZ+cEQGiVzg6lzAiEAvr0tNA823HjfXKuJtbB7RuXtWH5b/tZmTQdU7dLJW6A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38871},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"34730cfb0022064cc9cde146de86738494058f11","scripts":{"dev":"tsx watch src/index.ts","pub":"npm publish --access public","test":"vitest","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"repository":{"url":"git+https://github.com/danthegoodman1/result-ts.git","type":"git"},"_npmVersion":"10.9.2","description":"Rust-style serializableResult type for TypeScript","directories":{},"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","vitest":"^3.2.4","typescript":"~5.8.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/result-ts_0.3.2_1767278655034_0.33572876047770284","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@danthegoodman/result-ts","version":"0.3.3","type":"module","description":"Rust-style serializableResult type for TypeScript","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"devDependencies":{"@types/node":"^22.0.0","tsx":"^4.19.0","typescript":"~5.8.0","vitest":"^3.2.4"},"scripts":{"start":"node dist/index.js","dev":"tsx watch src/index.ts","build":"tsc","prepublishOnly":"npm run build","test":"vitest","pub":"npm publish --access public"},"author":{"name":"danthegoodman1"},"repository":{"type":"git","url":"git+https://github.com/danthegoodman1/result-ts.git"},"homepage":"https://github.com/danthegoodman1/result-ts#readme","bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"license":"ISC","_id":"@danthegoodman/result-ts@0.3.3","gitHead":"da3be4baeacc76658b487502fe3bae6b49e42046","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-b5chgASf5Eu8gxvIDDm1pTv1fxPVQ85TvMnQCETVuMwd60SEtQTZmVfYiYXosEPclM7/miCsWtBnY+jQVPENuw==","shasum":"362f48f14b47a3d29889a70daa983150891b0cd0","tarball":"https://registry.npmjs.org/@danthegoodman/result-ts/-/result-ts-0.3.3.tgz","fileCount":8,"unpackedSize":40541,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCb7NRMX0VW+Nkj4pP+QlVEGiDqu8juIQPkXPXAUL4EuQIgbfvDmyC4/fp8+ijXHAnmP/BavAkTEeXYEPbKhmVi00w="}]},"_npmUser":{"name":"danthegoodman","email":"dan@danthegoodman.com"},"directories":{},"maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/result-ts_0.3.3_1768337480630_0.10074202091793572"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-14T17:46:27.437Z","modified":"2026-01-13T20:51:20.992Z","0.0.1":"2025-07-14T17:46:27.760Z","0.0.2":"2025-07-14T17:51:13.926Z","0.0.3":"2025-07-14T17:58:36.375Z","0.1.0":"2025-12-20T17:53:55.475Z","0.1.1":"2025-12-20T17:59:20.153Z","0.1.2":"2025-12-26T14:53:08.174Z","0.1.3":"2025-12-26T15:23:51.125Z","0.1.4":"2025-12-26T16:04:54.145Z","0.1.5":"2025-12-30T14:21:09.936Z","0.2.0":"2025-12-31T21:57:19.453Z","0.2.1":"2025-12-31T22:13:21.503Z","0.2.2":"2025-12-31T22:17:13.545Z","0.3.0":"2026-01-01T13:10:16.108Z","0.3.1":"2026-01-01T13:17:43.748Z","0.3.2":"2026-01-01T14:44:15.184Z","0.3.3":"2026-01-13T20:51:20.795Z"},"bugs":{"url":"https://github.com/danthegoodman1/result-ts/issues"},"author":{"name":"danthegoodman1"},"license":"ISC","homepage":"https://github.com/danthegoodman1/result-ts#readme","keywords":["result","error-handling","rust","functional-programming","typescript","type-safe"],"repository":{"type":"git","url":"git+https://github.com/danthegoodman1/result-ts.git"},"description":"Rust-style serializableResult type for TypeScript","maintainers":[{"name":"danthegoodman","email":"dan@danthegoodman.com"}],"readme":"# result-ts\n\nRust-style Result types in TypeScript. JSON-serializable with automatic error chain tracing.\n\nFollows the Rust Result type: https://doc.rust-lang.org/std/result/enum.Result.html\n\n```\nnpm i @danthegoodman/result-ts\n```\n\n```ts\nimport { Ok, Err, Throwable, match, trace, unwrap, isResult, type Result } from '@danthegoodman/result-ts'\n\n// Basic usage\nfunction divide(a: number, b: number): Result<number, string> {\n  if (b === 0) {\n    return Err(\"Cannot divide by zero\")\n  }\n  return Ok(a / b)\n}\n\nconst result = divide(10, 2)\nif (result.isOk) {\n  console.log(\"Result:\", result.Ok) // Result: 5\n} else {\n  console.log(\"Error:\", result.Err)\n}\n\n// Using Throwable with JSON.parse\nconst parseJSON = (json: string): Result<any, Error> =>\n  Throwable(() => JSON.parse(json))\n\nconst validJson = parseJSON('{\"name\": \"Alice\"}')\nconst invalidJson = parseJSON('invalid json')\n\nmatch(validJson, {\n  Ok: (data) => console.log(\"Parsed:\", data), // Parsed: { name: \"Alice\" }\n  Err: (error) => console.log(\"Parse error:\", error.message)\n})\n\nmatch(invalidJson, {\n  Ok: (data) => console.log(\"Parsed:\", data),\n  Err: (error) => console.log(\"Parse error:\", error.message) // Parse error: Unexpected token 'i'...\n})\n```\n\n## JSON Serialization\n\nResult objects are plain JavaScript objects, making them fully JSON-serializable:\n\n```ts\nconst result = Err({ code: \"NOT_FOUND\", message: \"User not found\" })\n\n// Serialize and send over the wire\nconst json = JSON.stringify(result)\n\n// Deserialize on the receiving end\nconst parsed = JSON.parse(json)\n\n// Continue the error chain\nif (parsed.isErr) {\n  return Err(parsed) // Trace is preserved and extended\n}\n```\n\n## Automatic error chaining\n\nResult will automatically build Err chains when you call `Err()`. Use `trace()` to get the call stack:\n\n```ts\nfunction inner(): Result<string> {\n  return Err(new Error(\"inner failure\"))\n}\n\nfunction outer(): Result<number> {\n  const result = inner()\n  if (result.isErr) {\n    return Err(result)\n  }\n  return Ok(123)\n}\n\nconst result = outer()\nif (result.isErr) {\n  console.log(\"Error:\", result.Err.message)\n  console.log(\"Trace:\", trace(result))\n}\n```\n\nOutput:\n\n```\nError: inner failure\nTrace: [\n  { functionName: 'inner', file: '...', line: 25 },\n  { functionName: 'outer', file: '...', line: 31 }\n]\n```\n\n### Context strings\n\nIn environments where stack traces aren't available (e.g. base V8 engines), you can add an optional context string to `Err()` and `unwrap()`:\n\n```ts\nfunction fetchUser(id: string): Result<User, Error> {\n  const result = db.query(id)\n  if (result.isErr) {\n    return Err(result, \"fetching user from database\")\n  }\n  return Ok(result.Ok)\n}\n\nfunction handleRequest(): Result<Response, Error> {\n  const user = unwrap(fetchUser(\"123\"), \"in handleRequest\")\n  return Ok({ user })\n}\n```\n\nThe context appears in the trace alongside file/line info:\n\n```ts\ntrace(result)\n// [\n//   { file: '...', line: 10, context: 'fetching user from database' },\n//   { file: '...', line: 20, context: 'in handleRequest' }\n// ]\n```\n\nTo propagate errors up the stack (like Rust's `?` operator), wrap the Result in `Err()`:\n\n```ts\nif (someResult.isErr) {\n  return Err(someResult)\n}\n```\n\n## The `?` Operator Pattern\n\nUse `unwrap` inside `Throwable` to mimic Rust's `?` operator. `unwrap` returns the Ok value or throws the Result itself if it's an Err, and `Throwable` catches and re-wraps it:\n\n```ts\nfunction processData(): Result<Output, Error> {\n  return Throwable(() => { // Catches the thrown Result and returns it\n    const a = unwrap(stepOne())   // throws Result if Err\n    const b = unwrap(stepTwo(a))  // throws Result if Err\n    return b\n  })\n}\n```\n\nSince `unwrap` throws the Result (not the underlying error), traces are preserved through the throw/catch cycle.\n\n## API\n\n### Factory Functions\n\n- `Ok(value)` - Create a successful result\n- `Err(error, context?)` - Create an error result (also accepts another `ErrResult` to chain)\n- `Throwable(fn)` - Wrap a function that may throw in a Result\n- `AsyncThrowable(fn)` - Wrap an async function that may throw in a Promise<Result>\n\n### Utility Functions\n\n- `unwrap(result, context?)` - Get the Ok value or throw the Result (like Rust's `?`)\n- `expect(result, message)` - Get the Ok value or throw an Error with the provided message\n- `unwrapErr(result)` - Get the Err value or throw the Ok value\n- `expectErr(result, message)` - Get the Err value or throw an Error with the provided message\n- `match(result, { Ok, Err })` - Pattern match on the result\n- `map(result, fn)` - Transform the Ok value with a function returning Result\n- `mapErr(result, fn)` - Transform the Err value with a function returning Result\n- `trace(result)` - Get the call site trace for an error\n- `withoutTraces(result)` - Return a new Result with traces stripped\n- `isResult(value)` - Type guard to check if a value is a Result\n","readmeFilename":"README.md"}