minor tweak...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-01-25 01:59:10 +03:00
parent c9f99d9ce0
commit eb1744fd6c
2 changed files with 7 additions and 1 deletions

View File

@ -799,6 +799,9 @@ object.Constructor('Parser', {
&& key.replace(this.optionInputPattern, '$2') == 'help' && key.replace(this.optionInputPattern, '$2') == 'help'
&& this['-help'] == '-h'){ && this['-help'] == '-h'){
for(var n in this){ for(var n in this){
// skip non-options...
if(/^[\w_]/.test(n)){
continue }
// only print if extended help available... // only print if extended help available...
if(this[n] instanceof Parser){ if(this[n] instanceof Parser){
return this.extendedHelp.handler.call(this, ...arguments) } } } return this.extendedHelp.handler.call(this, ...arguments) } } }
@ -969,6 +972,9 @@ object.Constructor('Parser', {
// print help for nested parsers... // print help for nested parsers...
for(var n in this){ for(var n in this){
// skip non-options...
if(/^[\w_]/.test(n)){
continue }
// doc... // doc...
if(this[n] instanceof Parser if(this[n] instanceof Parser
&& this[n].doc !== false){ && this[n].doc !== false){

View File

@ -1,6 +1,6 @@
{ {
"name": "ig-argv", "name": "ig-argv",
"version": "2.16.9", "version": "2.16.10",
"description": "simple argv parser", "description": "simple argv parser",
"main": "argv.js", "main": "argv.js",
"scripts": { "scripts": {