Skip to content

Commit 4d65d18

Browse files
committed
update README.md [skip publish]
1 parent 318cbe5 commit 4d65d18

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ Any arguments that are not taken by options or commands, are automatically passe
118118
| Name | Type | Required | Example | Description |
119119
| ------------- | --------------------------- | -------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
120120
| `name` | `string` || `"my-command"` | The name of the command, which will be used in the CLI to trigger it |
121-
| `aliases` | `string[]` | | `["m", "mc"]` | Alternate names for the command, available for use in addition to `name` |
122-
| `description` | `string` | | `"Description of the command"` | Description for the command, only displayed with `--help` or `printHelp()` |
121+
| `aliases` | `string[]` | | `["m", "mc"]` | Alternate names for the command, available for use in addition to `name` |
122+
| `description` | `string` | | `"Description of the command"` | Description for the command, only displayed with `--help` or `printHelp()` |
123123
| `run` | `function(options) => void` || `(options) => console.log("my-command", options)` | Main function that runs this command. The supplied argument is the options passed via the CLI and parsed by massarg. |
124124

125125
### Example
@@ -162,12 +162,12 @@ Any arguments that are not taken by options or commands, are automatically passe
162162
| Name | Type | Required | Default | Example | Description |
163163
| ------------- | --------------------------------- | -------- | -------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
164164
| `name` | `string` || | `"my-number"` | The name of the option, which will be used in the CLI to apply it |
165-
| `aliases` | `string[]` | | | `["n"]` | Alternate names for the option, available for use in addition to `name` |
166-
| `description` | `string` | | | `"Description of the command"` | Description for the command, only displayed with `--help` or `printHelp()` |
167-
| `parse` | `function(value, options) => any` | | `String` | `(value, options) => parseInt(value)` | Function that parses this option. The supplied arguments are the string value from the arg, and other options passed via the CLI and parsed by massarg before this one. Not all options will be available. |
168-
| `boolean` | `boolean` | | `false` | | When set to `true`, this option will be treated as a boolean: will accept no value as `true`, or other truthy values as `true`, and the rest as `false` |
169-
| `array` | `boolean` | | `false` | | When set to true, you will be able to take multiple values when using the same option more than once. They will all be parsed properly and put into an array. |
170-
| `required` | `boolean` | | `false` | | When an option is required, parsing will throw a `RequiredError` if it was not given a proper value. If it is attached to a specific (or several) commands, it will only throw if the relevant command was used. |
165+
| `aliases` | `string[]` | | | `["n"]` | Alternate names for the option, available for use in addition to `name` |
166+
| `description` | `string` | | | `"Description of the command"` | Description for the command, only displayed with `--help` or `printHelp()` |
167+
| `parse` | `function(value, options) => any` | | `String` | `(value, options) => parseInt(value)` | Function that parses this option. The supplied arguments are the string value from the arg, and other options passed via the CLI and parsed by massarg before this one. Not all options will be available. |
168+
| `boolean` | `boolean` | | `false` | | When set to `true`, this option will be treated as a boolean: will accept no value as `true`, or other truthy values as `true`, and the rest as `false` |
169+
| `array` | `boolean` | | `false` | | When set to true, you will be able to take multiple values when using the same option more than once. They will all be parsed properly and put into an array. |
170+
| `required` | `boolean` | | `false` | | When an option is required, parsing will throw a `RequiredError` if it was not given a proper value. If it is attached to a specific (or several) commands, it will only throw if the relevant command was used. |
171171

172172
### Example
173173

@@ -217,7 +217,7 @@ atop as titles, if specified.
217217
| ------------- | -------- | -------- | ------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
218218
| `input` | `string` || | `"my-cmd --number 10"` | The input line, an example of user input that will be displayed as "shell" commands. The prefix is customizable through the `help()` options. |
219219
| `outnput` | `string` || | `"you entered my-cmd with the number 10, which is larger than 5"` | The output line, an example of the command's output that will be displayed as "shell" output. The prefix is customizable through the `help()` options. |
220-
| `description` | `string` | | | `"Run the my-cmd command with a number parameter"` | An explanation of the input/output that will be display as a title above the input if specified. |
220+
| `description` | `string` | | | `"Run the my-cmd command with a number parameter"` | An explanation of the input/output that will be display as a title above the input if specified. |
221221

222222
### Example
223223

0 commit comments

Comments
 (0)