Skip to main content
Home

Built and signed on GitHub Actions

Well-tested utility functions dealing with async iterables

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
88%
Published
2 years ago (0.6.0)
f
assertStreams

Makes an assertion that the elements of the actual iterable are equal to the elements of the expected array.

f
assertStreamStartsWith

Makes an assertion that the beginning elements of the actual iterable are in common with the elements of the expected array.

f
concat

Concatenates multiple async iterables into one async iterable.

f
count

Makes an infinite async iterable of evenly spaced values starting with the start number.

f
cycle

Makes an async iterator that yields elements from the source and saving a copy of each. When the source is exhausted, yields saved copies indefinitely.

f
drop

Drops a specified number of elements from the beginning of an async iterable, and yields the remaining elements.

f
dropEnd

Drops a specified number of elements from the end of an async iterable, and yields the remaining elements.

f
dropWhile

Drops elements from the beginning of an async iterable as long as a specified condition is met, and yields the remaining elements.

f
filter

Eliminates all elements from the iterable source that do not satisfy the predicate function.

f
fromIterable

Turns a synchrnous iterable source into an async iterable.

f
groupBy

Groups elmenets of an async interable source according to a specified keySelector function and creates a map of each group key to the elements in that group. Key values are compared using the === operator.

f
map

Transforms every element of the iterable source into a new iterable.

c
Range

An immutable sequence of numbers. It implements both Iterable and AsyncIterable.

f
range

Creates a Range of numbers from 0 to stop with step 1.

f
reduce

Apply reducer function of two arguments cumulatively to the elements of an async iterable source, from left to right, so as to reduce the async iterable to a single value.

f
repeat

Makes an async iterator that yields the same value over and over again. It will repeat indefinitely unless times is specified.

f
take

Takes a specified number of elements from the beginning of an async iterable.

f
takeEnd

Takes a specified number of elements from the end of an async iterable.

f
takeWhile

Takes elements from the beginning of an async iterable as long as a specified condition is met. If the condition is not met, the iterable stops.

f
tee
No documentation available
f
toArray

Creates an array from an async iterable.

f
toMap

Creates a map from an async iterable of key-value pairs. Each pair is represented as an array of two elements.

f
toSet

Creates a set from an async iterable.

f
unique

Eliminate duplicates in an async iterable source.

f
fromIterable

Turns a synchrnous iterable source into an async iterable.

f
toArray

Creates an array from an async iterable.

f
toMap

Creates a map from an async iterable of key-value pairs. Each pair is represented as an array of two elements.

f
toSet

Creates a set from an async iterable.

f
concat

Concatenates multiple async iterables into one async iterable.

f
drop

Drops a specified number of elements from the beginning of an async iterable, and yields the remaining elements.

f
dropEnd

Drops a specified number of elements from the end of an async iterable, and yields the remaining elements.

f
dropWhile

Drops elements from the beginning of an async iterable as long as a specified condition is met, and yields the remaining elements.

f
filter

Eliminates all elements from the iterable source that do not satisfy the predicate function.

f
reduce

Apply reducer function of two arguments cumulatively to the elements of an async iterable source, from left to right, so as to reduce the async iterable to a single value.

f
count

Makes an infinite async iterable of evenly spaced values starting with the start number.

f
cycle

Makes an async iterator that yields elements from the source and saving a copy of each. When the source is exhausted, yields saved copies indefinitely.

f
repeat

Makes an async iterator that yields the same value over and over again. It will repeat indefinitely unless times is specified.

f
map

Transforms every element of the iterable source into a new iterable.

c
Range

An immutable sequence of numbers. It implements both Iterable and AsyncIterable.

f
range

Creates a Range of numbers from 0 to stop with step 1.

f
take

Takes a specified number of elements from the beginning of an async iterable.

f
takeEnd

Takes a specified number of elements from the end of an async iterable.

f
takeWhile

Takes elements from the beginning of an async iterable as long as a specified condition is met. If the condition is not met, the iterable stops.

f
tee
No documentation available
f
assertStreams

Makes an assertion that the elements of the actual iterable are equal to the elements of the expected array.

f
assertStreamStartsWith

Makes an assertion that the beginning elements of the actual iterable are in common with the elements of the expected array.

f
groupBy

Groups elmenets of an async interable source according to a specified keySelector function and creates a map of each group key to the elements in that group. Key values are compared using the === operator.

f
unique

Eliminate duplicates in an async iterable source.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.