DieselDepot-APP/node_modules/es-toolkit/dist/fp/array/findLast.mjs
SJCoetz def597c157 chore: add generated build artifacts and node module type files
add all Next.js build outputs and third-party dependency type declaration files
2026-07-20 01:18:42 +02:00

11 lines
280 B
JavaScript

//#region src/fp/array/findLast.ts
function findLast(predicate) {
return function(array) {
for (let index = array.length - 1; index >= 0; index--) {
const value = array[index];
if (predicate(value, index, array)) return value;
}
};
}
//#endregion
export { findLast };