7 lines
178 B
JavaScript
7 lines
178 B
JavaScript
|
import leastIndex from "./leastIndex.js";
|
||
|
|
||
|
export default function scan(values, compare) {
|
||
|
const index = leastIndex(values, compare);
|
||
|
return index < 0 ? undefined : index;
|
||
|
}
|