UNPKG

xe-utils

Version:

JavaScript 函数库、工具类

13 lines (11 loc) • 331 B
import helperStringIndexOf from './helperStringIndexOf.js';function arrayIndexOf (list, val) { if (list.indexOf) { return helperStringIndexOf(list, val) } for (var index = 0, len = list.length; index < len; index++) { if (val === list[index]) { return index } } } export default arrayIndexOf