forked from pkgjs/parseargs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(parseArgs): set positionals and handle withValue with multiples …
…options This PR handles: 1. setting values for args only if the arg is specified in the options.withValue array 2. set arg value to undefined if withValue isn't specified 3. add args without a dashprefix to the positionals array 4. handle only recording the last value for the arg, in the case of multiple values set for same arg 5. in the case of multiple values set for the same arg, and 'multiples' options having been set, handle recording all values for the arg in the returned array 6. Introduces new test cases covering readme examples, withValue, multiples, and error throwing bad input cases
- Loading branch information
Showing
2 changed files
with
80 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters