Useful modules for working with async iterables:
abortable-iterator
- Make any iterator or iterable abortable via an AbortSignalasync-iterator-to-pull-stream
- Convert a (async) iterator to a pull streamemitterator
- Convert async iterator to event emitterevent-iterator
- Convert event emitter to async iteratorget-iterator
- Get the default iterator or async iterator for an Iterableit-all
- Collect the contents of an iterable into an arrayit-concat
- Concat all buffers/strings yielded from an async iterable into a single BufferList/stringit-batch
- Batch up the contents of an iterable into arraysit-block
- Transform input into equally-sized blocks of outputit-buffer
- Is it a string? Is it aBufferList
? Or just aBuffer
? Worry no more with it-buffer! It exposes a transform stream that converts all buffer-like objects into true buffersit-buffer-stream
- An async iterator that emits buffers containing bytes up to a certain lengthit-drain
- Drains an async iterator without returning anythingit-first
- Returns the first item from an async iterableit-flat-batch
Take an iterable of variable length arrays and make them all the same lengthit-glob
- Async iterable filename pattern matcherit-goodbye
- Add a goodbye handshake to a duplex async iterableit-handshake
- Create handshakes for binary protocols with duplex async iterableit-keepalive
- Keep an async iterable alive by yielding a value if it doesn't yield a value before the timeoutit-last
- Returns the last item from an async iterableit-length-prefixed
- Streaming length prefixed buffers with async iterablesit-pb-rpc
- A convenience-wrapper around protocol-buffers and lp-messages functionsit-postmsg
- Streaming iterables overwindow.postMessage
it-multipart
- HTTP multipart message parserit-pair
- A pair of {source, sink} streams that are internally connected (what goes into the sink comes out the source)it-parallel-batch
Take an iterable of functions that return promises and run them in parallel in batchesit-pipe
- Utility to "pipe" async iterables togetherit-pushable
- Pushable iterableit-reader
- Read an exact number of bytes from a binary (async) iterableit-tar
- Streaming tar parser (and maybe a generator in the future) and nothing elseit-to-stream
- Convert streaming iterables to Node.js streamsit-ws
- Simple async iterators for websocket client and server connectionsiterable-ndjson
- NDJSON parsing/encodingparamap-it
- Parallel mapping for async iterablespull-stream-to-async-iterator
- Convert a pull stream to an async iteratorrecoverable-iterator
- If an iterator errors, restart and continuestream-to-it
- Convert Node.js streams to streaming iterablesstreaming-iterables
- A Swiss army knife for async iterablesiter-tools
- The iterable toolbox