Skip to content
This repository was archived by the owner on Jul 13, 2025. It is now read-only.

Commit 2abad3f

Browse files
committed
feat: Alias flatten() -> flat()
1 parent 0bc0ca0 commit 2abad3f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/sequence.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,12 @@ const takeWithFallback = curry('takeWithFallback', (seq, no, fallback) => pipe(
12331233
*
12341234
* `list(takeWhile([1,2,3,4,5,6...], x => x < 4))` yields `[1,2,3]`
12351235
*
1236+
* # Version History
1237+
*
1238+
* - 2.0.0 Add alias flatten()
1239+
*
12361240
* @function
1241+
* @alias flatten
12371242
* @param {Sequence} seq Any sequence for which iter() is defined
12381243
* @param {Function} fn The predicate function
12391244
* @returns {Iterator}
@@ -1301,6 +1306,8 @@ function* flat(seq) {
13011306
}
13021307
}
13031308

1309+
const flatten = flat;
1310+
13041311
/**
13051312
* Concatenate any number of sequences.
13061313
* This is just a variadic alias for `flat()`
@@ -1905,6 +1912,7 @@ module.exports = {
19051912
takeUntilVal,
19061913
takeDef,
19071914
flat,
1915+
flatten,
19081916
concat,
19091917
prepend,
19101918
append,

0 commit comments

Comments
 (0)