UNPKG

hd-utils

Version:

A handy utils for modern JS developers

6 lines (5 loc) 262 B
/** * @description return true if the current index is the last index in the loop * @example [1,2,3].map((n, i, arr) => isLastIndexInLoop(arr, i)) // [false, false, true] */ export default function isLastIndexInLoop(arr: any[], currentIndx: number): boolean;