flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
22
VISUALIZACION/node_modules/d3-array/src/minIndex.js
generated
vendored
Executable file
22
VISUALIZACION/node_modules/d3-array/src/minIndex.js
generated
vendored
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
export default function minIndex(values, valueof) {
|
||||
let min;
|
||||
let minIndex = -1;
|
||||
let index = -1;
|
||||
if (valueof === undefined) {
|
||||
for (const value of values) {
|
||||
++index;
|
||||
if (value != null
|
||||
&& (min > value || (min === undefined && value >= value))) {
|
||||
min = value, minIndex = index;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let value of values) {
|
||||
if ((value = valueof(value, ++index, values)) != null
|
||||
&& (min > value || (min === undefined && value >= value))) {
|
||||
min = value, minIndex = index;
|
||||
}
|
||||
}
|
||||
}
|
||||
return minIndex;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue