From cfb50d7143f8b979bee5d8ef2459ce3a8c77e893 Mon Sep 17 00:00:00 2001 From: Vitaly Tomilov Date: Fri, 2 Aug 2024 13:00:20 +0100 Subject: [PATCH] docs --- src/ops/flat-map.ts | 3 ++- src/ops/flat.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ops/flat-map.ts b/src/ops/flat-map.ts index af0a9014..7675bf97 100644 --- a/src/ops/flat-map.ts +++ b/src/ops/flat-map.ts @@ -3,7 +3,8 @@ import {createOperation} from '../utils'; import {isPromiseLike} from '../typeguards'; /** - * Remaps and then flattens an iterable, consistent with the logic of {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap Array.flatMap} + * Remaps and then flattens an iterable, similar to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap Array.flatMap}, + * except it flattens all iterable values, including strings. * * ```ts * import {pipe, flatMap} from 'iter-ops'; diff --git a/src/ops/flat.ts b/src/ops/flat.ts index 8dbead0a..4bd2fdb8 100644 --- a/src/ops/flat.ts +++ b/src/ops/flat.ts @@ -24,7 +24,7 @@ export type Flatten = : Flatten; /** - * Expands / flattens sub-iterables up to the specified `depth` (default is 1), with optional `skip` logic. + * Expands / flattens sub-iterables up to the specified `depth` (default is 1), with support for `skip` logic. * * ```ts * import {pipe, flat} from 'iter-ops'; @@ -61,6 +61,7 @@ export type Flatten = * * @see * - {@link spread} + * - {@link flatMap} * - {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat Array.flat} * @category Sync+Async */