Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Dec 19, 2021
1 parent 76255aa commit 4f093aa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/utils/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export const findValue = function (iterable, func) {
}
}

// Like `Array.find()` but reversed.
// Like `Array.findLast()`.
// TODO: replace with `Array.findLast()` once this is supported by all
// supported Node.js versions.
// Use imperative code for performance.
export const findReverse = function (array, testFunc) {
// eslint-disable-next-line fp/no-loops, fp/no-let, fp/no-mutation
Expand All @@ -26,7 +28,9 @@ export const findReverse = function (array, testFunc) {
}
}

// Like `Array.findIndex()` but reversed.
// Like `Array.findLastIndex()`.
// TODO: replace with `Array.findLastIndex()` once this is supported by all
// supported Node.js versions.
// Use imperative code for performance.
export const findIndexReverse = function (array, testFunc) {
// eslint-disable-next-line fp/no-loops, fp/no-let, fp/no-mutation
Expand Down

0 comments on commit 4f093aa

Please sign in to comment.