source: node_modules/victory-vendor/lib-vendor/d3-array/src/minIndex.js

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 650 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = minIndex;
7function minIndex(values, valueof) {
8 let min;
9 let minIndex = -1;
10 let index = -1;
11 if (valueof === undefined) {
12 for (const value of values) {
13 ++index;
14 if (value != null && (min > value || min === undefined && value >= value)) {
15 min = value, minIndex = index;
16 }
17 }
18 } else {
19 for (let value of values) {
20 if ((value = valueof(value, ++index, values)) != null && (min > value || min === undefined && value >= value)) {
21 min = value, minIndex = index;
22 }
23 }
24 }
25 return minIndex;
26}
Note: See TracBrowser for help on using the repository browser.