Voft – VAVR‑style objects for Typscript
Voft – VAVR‑style objects for Typscript
Hi HN, Some time ago I released voft (Various Objects For TypeScript), a tiny utility library that brings some of the ergonomics of the Java VAVR functional library to TypeScript/JavaScript. Why? I missed VAVR's Try monad when writing Node back‑ends and React front‑ends: it lets you chain calls without drowning in try/catch blocks. I wanted an async‑aware variant (AsyncTry) for promise chains. Existing FP libs (fp‑ts, purify, etc.) cover similar ground but felt heavier for small projects, and I also wanted to challenge myself. What's inside? - Try – wrap any sync code, then .map, .flatMap, .recover… - AsyncTry – same, but for Promise‑based flows; awaitable and chainable. - Optional – lightweight Maybe. - Either<L, R> – success/failure container with ergonomic helpers. Early days – the API is still settling and there are probably bugs. I'd love feedback, issues and PRs! Thanks for reading!
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
Functo – Composable method objects in Ruby
An Experimental 'LINQ to Objects' in Go
Functional Objects
Functional Objects
Functional Objects
Functional Objects
RegEx for Arrays of Arbitrary Objects
Bootstrap Typeahead With Objects
Objects Lifespan Expanding App
Fast containers of polymorphic objects