byethrow
A lightweight Result type package

Say goodbye to throw, embrace type-safe results

npm
yarn
pnpm
bun
deno
npm install @praha/byethrow
🌲

🌲 Tree-shakable

Only include what you use. Lightweight and optimized for modern bundlers.

🧱

🧱 Object-based Design

No classes or complex inheritance hierarchies. Just plain objects that are easy to understand and debug.

🔄

🔄 Unified Sync/Async

Works seamlessly with both Result<T, E> and Promise<Result<T, E>>.

🎯

🎯 Focused Functionality

Result-centric utilities without unnecessary aliases or confusing variants.

🔗

🔗 Composable Pipeline

Powerful pipe function and chainable operations like andThen, andThrough for clean data flow.

🛡️

🛡️ Fully Type-Safe

All functions are type-tested. You won't be troubled by type errors.