stream: iterator helper drop take
The usual caveat that this is based on https://github.com/nodejs/node/pull/41612 to avoid conflicts - so that one has to land before this one and only look at the last commit :)
I am not sure about a few things about the API:
Need to check if the TC39 proposal coerces non-numbers passed to drop/take (if it does - I think we should to)- I didn't add support for AbortSignal because I saw C#'s IAsyncEnumerable doesn't support it. I pinged @bartdesmet who authored https://github.com/dotnet/reactive/commit/d596d9f6d8532e891424b5a758aeb3765155dcc6 to check why (their
.map
does support theirAbortSignal
for example like ours). - checked with the proposal and talked to the person who implemented it in c#.
Docs are missing, I am waiting for a decision on the AbortSignal before I'll write them
This was also worked on a while ago by @ronag :)