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
The methods with question marks are not designed to return the true or false value of the option, but rather whether or not the option was present/used. I can see why this might be confusing; I'll have a think about how to improve the README to clarify this.
Create a parser with a single boolean flag,
-t
/--test
, with a default value oftrue
.When parsing an empty command, both
opts['test']
andopts.test?
should returntrue
.Only
opts['test']
returns true;opts.test?
returns false.The text was updated successfully, but these errors were encountered: