Skip to content
Myr

Use Array.flat instead of array-flatten (#5677)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Mick A. · committed by GitHub · parent 723b545 · Browse files · 2 files+2 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−3 removed

  • other:+2 added−3 removed

2 files+2 added−3 removed

modified:lib/application.js+2 added-2 removed
19 unmodified lines
20var http = require('http');21var compileETag = require('./utils').compileETag;22var compileQueryParser = require('./utils').compileQueryParser;23var compileTrust = require('./utils').compileTrust;24var flatten = require('array-flatten').flatten24var merge = require('utils-merge');25var resolve = require('path').resolve;26var once = require('once')27var Router = require('router');
4 unmodified lines
32 * @private33 */3435var slice = Array.prototype.slice;36var flatten = Array.prototype.flat;3738/**39 * Application prototype.40 */
167 unmodified lines
208 path = fn;209 }210 }211212 var fns = flatten(slice.call(arguments, offset));212 var fns = flatten.call(slice.call(arguments, offset), Infinity);213214 if (fns.length === 0) {215 throw new TypeError('app.use() requires a middleware function')216 }
426 unmodified lines
modified:package.json-1 removed