loose-index-of.js 260 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 import { looseEqual } from './loose-equal' // Assumes that the first argument is an array export const looseIndexOf = (array, value) => { for (let i = 0; i < array.length; i++) { if (looseEqual(array[i], value)) { return i } } return -1 }