Merge pull request 'change flatten to Array#flat (Node 10.x EOL)' (#3) from f0x-validatem/core:master into master
Reviewed-on: #3
This commit is contained in:
commit
2fca34933d
|
@ -28,7 +28,6 @@
|
|||
"create-error": "^0.3.1",
|
||||
"default-value": "^1.0.0",
|
||||
"execall": "^2.0.0",
|
||||
"flatten": "^1.0.3",
|
||||
"indent-string": "^4.0.0",
|
||||
"is-arguments": "^1.0.4",
|
||||
"supports-color": "^7.1.0",
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
const isArguments = require("is-arguments");
|
||||
const flatten = require("flatten");
|
||||
const asExpression = require("as-expression");
|
||||
const syncpipe = require("syncpipe");
|
||||
|
||||
|
@ -68,7 +67,7 @@ function applyDefinitions(args, definitions, remainingArgumentsIndex) {
|
|||
return {
|
||||
errors: syncpipe(results, [
|
||||
(_) => _.map((result) => result.errors),
|
||||
(_) => flatten(_) // TODO: Switch to `Array#flat` once Node 10.x goes EOL (April 2021)
|
||||
(_) => _.flat(Infinity)
|
||||
]),
|
||||
newValue: results.map((result) => result.newValue)
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue