import { array } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { isOutOfBounds } = array;
Given an index and a ReadonlyArray, return true if the index is valid for the given array. This tests whether index is between 0 and arr.length inclusive.
Examples
Example 1
Example 1
import * as A from "./array.ts";
const arr = A.wrap(1);
const result1 = A.isOutOfBounds(0, arr); // false
const result2 = A.isOutOfBounds(-1, arr); // true
const result3 = A.isOutOfBounds(10, arr); // true
Parameters
ua: ReadonlyArray<A>