import { indexOf } from "https://deno.land/x/fae@v1.1.1/indexOf.ts";
Returns the position of the first occurrence of value
in list
, or -1
if the item is not included in the array. Fae.equals
is used to
determine equality.
Fae.indexOf(3, [1,2,3,4]); //=> 2
Fae.indexOf(10, [1,2,3,4]); //=> -1
Fae.indexOf(0, [1, 2, 3, 0, -0, NaN]); //=> 3
Fae.indexOf(-0, [1, 2, 3, 0, -0, NaN]); //=> 4
Fae.indexOf(NaN, [1, 2, 3, 0, -0, NaN]); //=> 5