• Version 2.0.2
  • Published
  • 72.5 kB
  • 3 dependencies
  • MIT license


npm i coa
yarn add coa
pnpm add coa


Command-Option-Argument: Yet another parser for command line options.



variable Arg

const Arg: undefined;

    variable Opt

    const Opt: undefined;


      function Cmd

      Cmd: (cmd?: classes.Cmd) => classes.Cmd;


        namespace classes

        namespace classes {}

          class Arg

          class Arg {}


            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(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(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;

                                                                                                                      namespace shell

                                                                                                                      namespace shell {}

                                                                                                                        function escape

                                                                                                                        escape: (w: string) => string;

                                                                                                                          function unescape

                                                                                                                          unescape: (w: string) => string;

                                                                                                                            Package Files (1)

                                                                                                                            Dependencies (3)

                                                                                                                            Dev Dependencies (6)

                                                                                                                            Peer Dependencies (0)

                                                                                                                            No peer dependencies.


                                                                                                                            To add a badge like this badgeto your package's README, use the codes available below.

                                                                                                                            You may also use to create a custom badge linking to

                                                                                                                            • Markdown
                                                                                                                            • HTML
                                                                                                                              <a href=""><img src="" alt=""></a>