From 040714bcea13240578e3d3c772c689a0ad5b7ec5 Mon Sep 17 00:00:00 2001 From: hyunwoo jo Date: Wed, 3 Jul 2024 10:37:47 +0900 Subject: [PATCH] feat: also can use forEach instead of each (#280) --- src/each.ts | 2 +- src/head.ts | 2 +- src/index.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/each.ts b/src/each.ts index 7db88973..ec2f070a 100644 --- a/src/each.ts +++ b/src/each.ts @@ -21,7 +21,7 @@ async function async( } /** - * Iterates over Iterable/AsyncIterable, applying each in turn to `f`. + * Iterates over Iterable/AsyncIterable, applying each in turn to `f`. (forEach) * * @example * ```ts diff --git a/src/head.ts b/src/head.ts index 03485b59..9517e017 100644 --- a/src/head.ts +++ b/src/head.ts @@ -14,7 +14,7 @@ type HeadReturnType = T extends readonly [a: infer H, ...rest: any[]] : never; /** - * Returns the first element of Iterable/AsyncIterable. + * Returns the first element of Iterable/AsyncIterable. (head) * * @example * ```ts diff --git a/src/index.ts b/src/index.ts index 1b22f994..44772196 100644 --- a/src/index.ts +++ b/src/index.ts @@ -76,6 +76,7 @@ export { curry, delay, each, + each as forEach, every, evolve, find,