UNPKG

@antv/layout

Version:
36 lines (30 loc) 904 B
/** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ var _strictIndexOf; var hasRequired_strictIndexOf; function require_strictIndexOf () { if (hasRequired_strictIndexOf) return _strictIndexOf; hasRequired_strictIndexOf = 1; function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } _strictIndexOf = strictIndexOf; return _strictIndexOf; } export { require_strictIndexOf as __require }; //# sourceMappingURL=_strictIndexOf.js.map