Skip to content

philiprbrenan/parseCommandLineArguments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

parseCommandLineArguments

Parse a string of command line arguments into positional and keyword parameters.

Test

const string  = "hello --person=name --location=world greeting -d1"

const results = {"keywords"   :
                   {"person"  : "name",
                    "location": "world",
                    "d"       : "1",
                   },
                 "positionals": ["hello","greeting"]}

assert.deepEqual(parseCommandLineArguments(string), results)

About

Parse a string of command line arguments into positional and keyword parameters.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published