5 ms·
Interesting project, but I'd stick with idx[0] since I have transpilation setup most of the time anyway. Also some of you could be interested in optional.js[1]
by harunurhan 9y ago
Interesting project, but I'd stick with idx[0] since I have transpilation setup most of the time anyway.
Also some of you could be interested in optional.js[1], it's Java's Optional for js, makes it arguably more pleasant to deal with null values, no help for chaining though!
[0] https://github.com/facebookincubator/idx https://github.com/facebookincubator/idx
[1] https://github.com/JasonStorey/Optional.js https://github.com/JasonStorey/Optional.js
- bcherny 9y agoAnd if you’re using TypeScript, theres also TSOption https://www.npmjs.com/package/tsoption https://www.npmjs.com/package/tsoption