Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:dpup/node-flags

  • Loading branch information...
commit a4ad366890f7ed15964b412fea9af6a376b25d84 2 parents bf6e0d2 + ea984fe
@dpup authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 README.md
View
14 README.md
@@ -57,16 +57,16 @@ All the define methods take the same arguments:
flags.defineX(name, opt_default, opt_description);
- name - The flag's name
- opt_default - [optional] The default value if not specified on the command line
- opt_description - [optional] Description to show in the help text
+`name` - The flag's name.
+`opt_default` - [optional] The default value if not specified on the command line.
+`opt_description` - [optional] Description to show in the help text.
The methods return a Flag object that exposes the following methods, for additional configuration:
- .setDefault({*} defaultValue) - Sets the flag's default value.
- .setDescription({string} description) - Sets the flag's description field.
- .setValidator({function(string)} validator) - Sets a function for validating the input, should throw if the input isn't valid.
- .setSecret({boolean} secret) - If set to true then the flag won't show up in the help text.
+`flag.setDefault({*} defaultValue)` - Sets the flag's default value.
+`flag.setDescription({string} description)` - Sets the flag's description field.
+`flag.setValidator({function(string)} validator)` - Sets a function for validating the input, should throw if the input isn't valid.
+`flag.setSecret({boolean} secret)` - If set to true then the flag won't show up in the help text.
These setters return the flag instance so they can be chained:
Please sign in to comment.
Something went wrong with that request. Please try again.