aboutsummaryrefslogtreecommitdiff
path: root/node_modules/fast-glob/out/utils/array.js
blob: 4a859f655fe73d8f5f38787e29cc0653a1328407 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Flatten nested arrays (max depth is 2) into a non-nested array of non-array items.
 */
function flatten(items) {
    return items.reduce(function (collection, item) { return [].concat(collection, item); }, []);
}
exports.flatten = flatten;
/**
 * Returns max number from array.
 */
function max(items) {
    return Math.max.apply(null, items);
}
exports.max = max;