@warren-bank/node-process-argv
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -66,2 +66,15 @@ const fs = require('fs') | ||
if (flag_opts && flag_opts["regex"]) { | ||
try { | ||
let flags = (typeof flag_opts["regex"] === 'string') ? flag_opts["regex"] : undefined | ||
val = new RegExp(val, flags) | ||
} | ||
catch(e) { | ||
if (throw_error_if_value_not_acceptable) { | ||
throw new Error(`Option "${args[index]}" requires a well-formed regular expression pattern.\nYou entered: "${val_verbatim}"\n\nError message from regex parser:\n${e.message}`) | ||
} | ||
val = "" | ||
} | ||
} | ||
if (flag_opts && flag_opts["file"]) { | ||
@@ -68,0 +81,0 @@ try { |
{ | ||
"name": "@warren-bank/node-process-argv", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "description": "An extremely lightweight node.js library to process command-line arguments.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27473
217