Hacker News new | ask | show | jobs
by harunurhan 3003 days 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 [1] https://github.com/JasonStorey/Optional.js

1 comments

And if you’re using TypeScript, theres also TSOption https://www.npmjs.com/package/tsoption