4 ms·
> Option, the type safe undefined I mean Scala because I guess it actually has it, but worth pointing out it's like 30 LOC to define one for JS, depending on h
by bern4444 5y ago
> Option, the type safe undefined
I mean Scala because I guess it actually has it, but worth pointing out it's like 30 LOC to define one for JS, depending on how many convenience methods you want.
Here's one I wrote: https://github.com/sbernheim4/excoptional https://github.com/sbernheim4/excoptional
I fully believe it to be the best Option implementation for JS/TS