Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Aug 2, 2024
1 parent 5060a5f commit cfb50d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/ops/flat-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 2 additions & 1 deletion src/ops/flat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type Flatten<T, N extends number> =
: Flatten<T, Decrement[N]>;

/**
* 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';
Expand Down Expand Up @@ -61,6 +61,7 @@ export type Flatten<T, N extends number> =
*
* @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
*/
Expand Down

0 comments on commit cfb50d7

Please sign in to comment.