
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
This library provides a well-tested collection of small utility functions dealing with async iterables. You can think of it as .NET LINQ or Python aitertools for Deno & Node.js.
For the complete list of functions, see the complete API reference.
concat(...sources): Concatenate multiple async iterables into one.take(source, count): Take the first count items from the source.drop(source, count): Drop the first count items from the source.takeWhile(source, predicate): Take items from the source while the
predicate returns true.dropWhile(source, predicate): Drop items from the source while the
predicate returns true.takeEnd(source, count): Take the last count items from the source.dropEnd(source, count): Drop the last count items from the source.map(mapper, ...sources): Apply the mapper to each item in the sources.filter(predicate, ...sources): Filter items in the sources by the
predicate.reduce(reducer, source, initial?): Reduce the source to a single value
by the reducer, optionally with the initial value.tee(source, number): Effectively duplicate the source into number
of async iterables.groupBy(source, keySelector): Group items in the source by the
keySelector.unique(source, keySelector?): Eliminate duplicate items in the source,
optionally by the keySelector.range(start?, stop, step?): Generate a sequence of numbers from start
to stop by step.count(start?, step?): Generate a sequence of numbers from start by
step infinitely.cycle(source): Cycle the source infinitely.repeat(value, times?): Repeat the value for times times, or
infinitely if times is not specified.fromIterable(source): Convert an iterable to an async iterable.toArray(source): Convert an async iterable to an array.toSet(source): Convert an async iterable to a Set.toMap(source, keySelector, valueSelector?): Convert an async iterable to
a Map.assertStreams(actual, expected, msg?): Asset that an async iterable
actual is equal to an array expected.assertStreamStartsWith(actual, expected, msg?): Asset that an async
iterable actual (which is possibly infinite) starts with an array
expected.In Deno:
$ deno add @hongminhee/aitertools
import * as aitertools from "@hongminhee/aitertools";
In Node.js:
$ npm add aitertools
import * as aitertools from "aitertools";
See CHANGES.md file. Note that unreleased versions are also available on JSR for Deno:
deno add @hongminhee/aitertools@0.6.0-dev.36+9aa783c
… and on npm with dev tag for Node.js:
$ npm add aitertools@dev
FAQs
Well-tested utility functions dealing with async iterables
We found that aitertools demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.