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
Copy file name to clipboardExpand all lines: README.md
+19-9Lines changed: 19 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ parse(argv, i, req, res, err)
112
112
```
113
113
114
114
-**argv**: Array of command line arguments (usually `process.argv`)
115
-
-**i**: Starting index for parsing (usually 2)
115
+
-**i**: Starting index for parsing (usually `2`)
116
116
-**req**: Configuration object defining your command structure
117
117
-**res**: Object that will be populated with parsed results
118
118
-**err**: Error handler function, receives `{msg, i, opt, key, val}` and returns boolean
@@ -142,10 +142,12 @@ The function returns either:
142
142
}
143
143
```
144
144
145
-
Option definitions can be:
146
-
- A string: `'--option'`
147
-
- An array of strings: `['--option', '-o']`
148
-
- Include `null` in an array to use the variable name as an option: `[null, '-o']`
145
+
Option definitions can be:
146
+
- A string: `'--option'`
147
+
- An array: `['--option', '-o']`
148
+
-`null` (refers to the variable name)
149
+
150
+
Note: `undefined` is not supported. While it may work like `null` in `OptKit`, this is unintended. At `ExitKit`, `undefined` behaves differently from `null`.
0 commit comments