Treats array as a linked list. An array with 3
items at index 3
would return array[0]. Normally array[3] would be undefined.
Any array
Any non-negative, non-infinity number.
import { ModIndex } from "@taystack/js-helpers";
const arr = [1,2,3];
ModIndex(arr, 0) // 1
ModIndex(arr, 3) // 1
ModIndex(arr, 300) // 1
Source: @taystack/js-helpers hosted on GitHub Author: taystack