You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mromanuk Is it really meaningful to know whether the option's value is explicit set in CLI or by default? If it is really necessary for you, the following example based on commandos may be useful to you:
constcommandos=require('commandos');constcmd=commandos.parse({options: ['--name']});// Only options which are multiple, or with default values, // or set in CLI will occur in the returned value.if(!cmd.hasOwnProperty('name')){cmd.name='Alice';}
Is there a way to tell if the parsed options, were default or set by the user?
For example I need to know if
--name Alice
and myoptions object
become:I would like to know if it was set in the cli or it is a default option.
Something like this::
The text was updated successfully, but these errors were encountered: