source: node_modules/victory-vendor/lib-vendor/d3-array/src/max.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: 565 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = max;
7function max(values, valueof) {
8 let max;
9 if (valueof === undefined) {
10 for (const value of values) {
11 if (value != null && (max < value || max === undefined && value >= value)) {
12 max = value;
13 }
14 }
15 } else {
16 let index = -1;
17 for (let value of values) {
18 if ((value = valueof(value, ++index, values)) != null && (max < value || max === undefined && value >= value)) {
19 max = value;
20 }
21 }
22 }
23 return max;
24}
Note: See TracBrowser for help on using the repository browser.