diff --git a/package.json b/package.json index 939c95b..d77223d 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/api/validate-arguments/index.js b/src/api/validate-arguments/index.js index 763cfb0..be91d93 100644 --- a/src/api/validate-arguments/index.js +++ b/src/api/validate-arguments/index.js @@ -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() ]), newValue: results.map((result) => result.newValue) };