From 0d3cf8edbeb61f62e9530cfcbc3b218733e96e2f Mon Sep 17 00:00:00 2001 From: cantwellsean0127 <103895364+cantwellsean0127@users.noreply.github.com> Date: Sat, 19 Aug 2023 21:29:37 -0700 Subject: [PATCH] Fixed Issue #44 [v1.2.8] Set default args parameter value to process.argv.split(2) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 78cafa8..5b67ae9 100644 --- a/index.js +++ b/index.js @@ -20,7 +20,7 @@ function isConstructorOrProto(obj, key) { return (key === 'constructor' && typeof obj[key] === 'function') || key === '__proto__'; } -module.exports = function (args, opts) { +module.exports = function (args = process.argv.split(2), opts) { if (!opts) { opts = {}; } var flags = {