clipop
Utility to parse terminal input into a JSON object
my-app --name "john doe" --is-admin
Options will be parsed like this:
You can also use notations:
my-app --names.firstname joe --hobbies[0].name hockey
This utility only returns options and other arguments are ignored:
my-app connect --uri localhost --ssl
Usage
npm install clipop
Value declarations
--foo hello # "hello" --foo 22 # "22" --foo true # "true" --foo false # "false" --foo null # "null" --foo # true --foo ---22 # 22 --foo ---true # true --foo ---false # false --foo ---null # null
Typescript suppor
clipop...params // my-app --name joe