Command
Command is a parser for shell-like-commands.
The main difference between Command and other parsers is that Command doesn't do exact behaviors.
Instead, it parses the command string and returns a program-readable object with arguments of the command.
Getting Started
Install and import Command:
npm install --save @ionjs/command
import { Command } from '@ionjs/command'
const command = new Command(declaration)
const input = getInputSomehow()
if (command.is(input))
result = command.parse(input)
The full explanation of the codes above is in the docs.
Contribution
- Become a stargazer if you are interested!
- ionjs currently have only few contributors, so PRs and issues are very welcomed.