UNPKG

@modern-kit/utils

Version:
14 lines (11 loc) 286 B
'use strict'; function at(arr, index = 0) { const len = arr.length; const relativeIndex = index < 0 ? len + index : index; if (relativeIndex < 0 || relativeIndex >= len) { return void 0; } return arr[relativeIndex]; } exports.at = at; //# sourceMappingURL=index.cjs.map