From 241c259da09961f6acedd26bea212c25246b6bad Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 27 Jul 2020 20:21:03 +0300 Subject: [PATCH] updated docs... Signed-off-by: Alex A. Naanou --- README.md | 64 ++++++++++++++++++++++++++++++++++++++++++---------- argv.js | 18 ++++++++++++--- package.json | 2 +- 3 files changed, 68 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index f259dbb..75bfe4c 100644 --- a/README.md +++ b/README.md @@ -212,7 +212,7 @@ var parser = argv.Parser({ }) ``` -This will create a parser that supports the folowing: +This will create a parser that supports the following: ```shell $ ./script.js --help @@ -263,10 +263,10 @@ The `` expects/handles the following data in the `` object: - option/command aliases An alias is an option/command key with a _string_ value. That value _references_ a different option or command, i.e. is an - option/commnad name. + option/command name. Looping (referencing the original alias) or dead-end (referencing - non-existant options) aliases are ignored. + non-existent options) aliases are ignored. ### Option/command configuration @@ -337,9 +337,9 @@ Option/command priority in the `-help`. Can be a positive or negative number or `undefined`. Ordering is as follows: -- options in decending positive `.priority`, +- options in descending positive `.priority`, - options with undefined `.priority` in order of definition, -- options in decending negative `.priority`. +- options in descending negative `.priority`. Note that options and commands are grouped separately. @@ -353,13 +353,13 @@ arg: '' arg: ' | ' ``` -If defined and no explicit value is passed to the option comand (via `=`) +If defined and no explicit value is passed to the option command (via `=`) then the _parser_ will consume the directly next non-option if present in `argv` as a value, passing it to the `