coa
- Version 2.0.2
- Published
- 72.5 kB
- 3 dependencies
- MIT license
Install
npm i coa
yarn add coa
pnpm add coa
Overview
Command-Option-Argument: Yet another parser for command line options.
Index
Variables
Functions
function Cmd
Cmd: (cmd?: classes.Cmd) => classes.Cmd;
Namespaces
namespace classes
namespace classes {}
class Arg
class Arg {}
constructor
constructor(cmd: Cmd);
method apply
apply: (...args: any[]) => Arg;
method arr
arr: () => Arg;
method comp
comp: (fn: (opts: any) => any) => Arg;
method def
def: (def: any) => Arg;
method end
end: () => Cmd;
method input
input: () => Arg;
method name
name: (name: string) => Arg;
method output
output: () => Arg;
method reject
reject: (...args: any[]) => Arg;
method req
req: () => Arg;
method title
title: (title: string) => Arg;
method val
val: (validation: (this: Arg, value: any) => boolean) => Arg;
class Cmd
class Cmd {}
constructor
constructor(cmd?: Cmd);
method act
act: (act: (opts: any, args: any[], res: any) => any, force?: boolean) => Cmd;
method api
api: () => any;
method apply
apply: (fn: Function, args?: any[]) => Cmd;
method arg
arg: () => Arg;
method cmd
cmd: (cmd?: Cmd) => Cmd;
method comp
comp: (fs: (opts: any) => any) => Cmd;
method completable
completable: () => Cmd;
method create
static create: (cmd?: Cmd) => Cmd;
method do
do: (argv: string[]) => any;
method end
end: () => Cmd;
method extendable
extendable: (pattern?: string) => Cmd;
method helpful
helpful: () => Cmd;
method invoke
invoke: (cmds?: string | string[], opts?: any, args?: any) => Q.Promise<any>;
method name
name: (name: string) => Cmd;
method opt
opt: () => Opt;
method reject
reject: (reason: any) => Q.Promise<any>;
method run
run: (argv: string[]) => Cmd;
method title
title: (title: string) => Cmd;
method usage
usage: () => string;
class Opt
class Opt {}
constructor
constructor(cmd?: Cmd);
method act
act: (act: (opts: any, args: any[], res: any) => any) => Opt;
method apply
apply: (...args: any[]) => void;
method arr
arr: () => Opt;
method comp
comp: (fn: (opts: any) => any) => Opt;
method def
def: (def: any) => Opt;
method end
end: () => Cmd;
method flag
flag: () => Opt;
method input
input: () => Opt;
method long
long: (long: string) => Opt;
method name
name: (name: string) => Opt;
method only
only: () => Opt;
method output
output: () => Opt;
method reject
reject: (...args: any[]) => void;
method req
req: () => Opt;
method short
short: (short: string) => Opt;
method title
title: (title: string) => Opt;
method val
val: (validation: (this: Opt, value: any) => boolean) => Opt;
Package Files (1)
Dependencies (3)
Dev Dependencies (6)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/coa
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/coa)
- HTML<a href="https://www.jsdocs.io/package/coa"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2962 ms. - Missing or incorrect documentation? Open an issue for this package.