To any readers, if you enjoyed this article you might take a moment to check out (or checkout) iter-tools. I currently maintain it, and it provides a great toolbox for working with any kind of iterables, including Arrays, Maps, Sets and the async iterables discussed in this article. It's the only set of tools I know that won't ever leak a file handle when used with something like the FileReaderByLines class described above.
Do you know IxJS?
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.