- nepattern
- alconna
Package | Version |
---|---|
Alconna | |
NEpattern |
import { Command, Args, Option} from "@arcletjs/alconna";
let cmd = new Command("npm", ["/"])
.option("list")
.subcommand("install", Args.push("pakName", String), [Option("-S|--save")])
let result = cmd.parse("/npm install tsc --save")
console.log(result.query("install"))
// Output as follows:
// value=null args={"pakName":["tsc"]} options={"save":{"value":Ellipsis,"args":{}}} subcommands={}