/* eslint prefer-rest-params: "off" */ /* eslint prefer-spread: "off" */ 'use strict'; const assert = require('assert'); const _ = require('lodash'); const Error = require('http-errors'); const Crypto = require('crypto'); const minimatch = require('minimatch'); const Utils = require('./utils'); const pkginfo = require('pkginfo')(module); // eslint-disable-line no-unused-vars const pkgVersion = module.exports.version; const pkgName = module.exports.name; /** * [[a, [b, c]], d] -> [a, b, c, d] * @param {*} array * @return {Array} */ function flatten(array) { let result = []; for (let i=0; i