mirror of
https://github.com/flynx/argv.js.git
synced 2025-10-28 10:20:09 +00:00
minor docs tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
1c9b2024c3
commit
4d33c68096
@ -22,7 +22,7 @@ This code is an evolution of that parser.
|
|||||||
nested contexts
|
nested contexts
|
||||||
- Option expansion
|
- Option expansion
|
||||||
`-abc` expands to `-a -b -c` if `-abc` is not defined
|
`-abc` expands to `-a -b -c` if `-abc` is not defined
|
||||||
- Option/command value asignment
|
- Option/command value assignment
|
||||||
implicit `-a 123` (requires either _definition_ or manual handling) or
|
implicit `-a 123` (requires either _definition_ or manual handling) or
|
||||||
explicit `-a=123`
|
explicit `-a=123`
|
||||||
- Read option/command value defaults from environment variables
|
- Read option/command value defaults from environment variables
|
||||||
@ -466,7 +466,7 @@ To stop option processing either return `STOP` or `THEN` from the handler.
|
|||||||
|
|
||||||
There are three ways to stop and/or report errors:
|
There are three ways to stop and/or report errors:
|
||||||
|
|
||||||
- Simply `throw` a `ParserError(..)` instance:
|
- Simply `throw` argv's `ParserError(..)` instance:
|
||||||
```javascript
|
```javascript
|
||||||
'-error': {
|
'-error': {
|
||||||
handler: function(){
|
handler: function(){
|
||||||
@ -475,7 +475,7 @@ There are three ways to stop and/or report errors:
|
|||||||
Here processing will stop and the error will be reported automatically
|
Here processing will stop and the error will be reported automatically
|
||||||
before [`<parser>.error(..)`](./ADVANCED.md#parsererror-1) is triggered.
|
before [`<parser>.error(..)`](./ADVANCED.md#parsererror-1) is triggered.
|
||||||
|
|
||||||
- _Silently_ `return` a `ParserError(..)` instance:
|
- _Silently_ `return` argv's `ParserError(..)` instance:
|
||||||
```javascript
|
```javascript
|
||||||
'-silent-error': {
|
'-silent-error': {
|
||||||
handler: function(){
|
handler: function(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user