EASYAIuniappNewUI/node_modules/@tuniao/tnui-vue3-uniapp/libs/lodash/_strictIndexOf.ts
2025-02-08 18:50:38 +08:00

16 lines
256 B
TypeScript

export function strictIndexOf(
array: string[],
value: string,
fromIndex: number
) {
let index = fromIndex - 1
const length = array.length
while (++index < length) {
if (array[index] === value) {
return index
}
}
return -1
}