Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Aug 8, 2024
1 parent 8483ad3 commit e66d01e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![codecov](https://codecov.io/github/jsr-core/iterutil/graph/badge.svg?token=pfbLRGU5AM)](https://codecov.io/github/jsr-core/iterutil)

Iterator / AsyncIterator utility pack for JavaScript and TypeScript. Each module
is designed to work independently, avoiding internal interdependencies as much
is designed to work independently, avoiding internal inter-dependencies as much
as possible.

## Usage
Expand All @@ -16,7 +16,7 @@ both synchronous and asynchronous iterables (`Iterable` and `AsyncIterable`).

### chain

Chains multiple iterables or async iterables together.
Chains multiple iterables together.

```ts
import { chain } from "@core/iterutil/chain";
Expand Down Expand Up @@ -54,7 +54,7 @@ console.log(await toArray(iter)); // [[1, 2], [3, 4], [5]]

### compact

Removes all nullish values from an iterable.
Removes all nullish (`null` or `undefined`) values from an iterable.

```ts
import { compact } from "@core/iterutil/compact";
Expand All @@ -73,7 +73,7 @@ console.log(await toArray(iter)); // [1, 2, 3]

### compress

Compress an iterable by selecting elements using a selector iterable.
Compresses an iterable by selecting elements using a selector iterable.

```ts
import { compress } from "@core/iterutil/compress";
Expand Down Expand Up @@ -164,7 +164,7 @@ console.log(await toArray(iter)); // [3, 4, 5]

### enumerate

Enumerate an iterable.
Enumerates an iterable.

```ts
import { enumerate } from "@core/iterutil/enumerate";
Expand Down Expand Up @@ -318,7 +318,7 @@ await forEach([1, 2, 3], console.log);

### iter

Convert an iterable to an iterator.
Converts an iterable to an iterator.

```ts
import { iter } from "@core/iterutil/iter";
Expand Down Expand Up @@ -431,7 +431,7 @@ console.log(odd); // [1, 3, 5]

### range

Generate a range of numbers.
Generates a range of numbers.

```ts
import { range } from "@core/iterutil/range";
Expand Down Expand Up @@ -492,7 +492,7 @@ console.log(await some([1, 3, 5], (value) => value % 2 === 0)); // false

### take

Take the first `limit` items from the iterable.
Takes the first `limit` items from the iterable.

```ts
import { take } from "@core/iterutil/take";
Expand All @@ -511,7 +511,7 @@ console.log(await toArray(iter)); // [1, 2]

### takeWhile

Take elements from the iterable while the predicate is true.
Takes elements from the iterable while the predicate is true.

```ts
import { takeWhile } from "@core/iterutil/take-while";
Expand Down

0 comments on commit e66d01e

Please sign in to comment.