UNPKG

hd-utils

Version:

A handy utils for modern JS developers

8 lines (7 loc) 259 B
/** * @description return true if the current index is the first index in the loop * @example [1,2,3].map((n, i) => isFirstIndexInLoop i)) => [false, false, true] */ export default function isFirstIndexInLoop(currentIndx) { return currentIndx === 0; }