This is nicely done. One function I've written that I frequently use is a generic iterate function which (in JS/TS land) allows you to loop over a T[], Array , ArrayLike , Iterable , AsyncIterable , including generators and async generators. It is just easier to always be able to write: "for await (const item of iterate(iterable))" in most places, without worrying about the type of the item I am looping over. I like…
Glad you like it!
I actually have a TODO for what you're describing haha
https://github.com/TomerAberbach/lfi/blob/69cdca0b2ee2bd078f...