Skip to content

Commit

Permalink
feat: Alias flatten() -> flat()
Browse files Browse the repository at this point in the history
  • Loading branch information
koraa committed Dec 23, 2019
1 parent 0bc0ca0 commit 2abad3f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/sequence.js
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,12 @@ const takeWithFallback = curry('takeWithFallback', (seq, no, fallback) => pipe(
*
* `list(takeWhile([1,2,3,4,5,6...], x => x < 4))` yields `[1,2,3]`
*
* # Version History
*
* - 2.0.0 Add alias flatten()
*
* @function
* @alias flatten
* @param {Sequence} seq Any sequence for which iter() is defined
* @param {Function} fn The predicate function
* @returns {Iterator}
Expand Down Expand Up @@ -1301,6 +1306,8 @@ function* flat(seq) {
}
}

const flatten = flat;

/**
* Concatenate any number of sequences.
* This is just a variadic alias for `flat()`
Expand Down Expand Up @@ -1905,6 +1912,7 @@ module.exports = {
takeUntilVal,
takeDef,
flat,
flatten,
concat,
prepend,
append,
Expand Down

0 comments on commit 2abad3f

Please sign in to comment.