Utility TypeScript @ 2.0.0-beta.2
    Preparing search index...

    Class NodeConsoleExperimental

    A configurable class for outputting to console within node.

    Includes formatting and interactive utilities.

    MessageMaker Used to format strings for output. Initialized in the constructor.

    0.1.1

    2.0.0-alpha — Prompters moved to a NodeConsole_Prompt property instead.

    Index

    Constructors

    Properties - Args

    Properties - Interactive

    Properties - Utilities

    Accessors - Args

    Methods - Aliases

    Methods - Args

    Methods - Outputters

    Methods - Outputters (Pre-formatted)

    Methods - Static

    Methods - Terminal

    Constructors

    Properties - Args

    A completed args object.

    Properties - Interactive

    Public alias for internal prompting methods.

    Properties - Utilities

    A local instance of MessageMaker initialized using {@link NodeConsole.Args}.msgMaker.

    Accessors - Args

    • get ARGS_DEFAULT(): {
          argsRecursive: true;
          msgMaker: { msg: { maxWidth: 100; tab: " " }; paintFormat: "node" };
          prompt: { throwError: "auto"; timeout: 300000 };
          separator: null;
          styleClrs: {
              disabled: "grey";
              error: "red";
              help: "grey";
              highlight: "purple";
          };
          varInspect: {};
      }
      Experimental

      Returns {
          argsRecursive: true;
          msgMaker: { msg: { maxWidth: 100; tab: " " }; paintFormat: "node" };
          prompt: { throwError: "auto"; timeout: 300000 };
          separator: null;
          styleClrs: {
              disabled: "grey";
              error: "red";
              help: "grey";
              highlight: "purple";
          };
          varInspect: {};
      }

    Methods - Aliases

    Methods - Args

    Methods - Outputters

    Methods - Outputters (Pre-formatted)

    Methods - Static

    Methods - Terminal

    • Experimental

      Runs given string as a terminal command, optional with arguments.

      Parameters

      • cmd: string

        Command to run in the terminal.

      • args: { [key: string]: null | string | number | boolean } = {}

        Optional. Passed to NodeConsole.cmdArgs. Default {}.

      • OptionalliteralFalse: boolean

        Optional. Passed to NodeConsole.cmdArgs. Default undefined.

      • Optionalequals: boolean

        Optional. Passed to NodeConsole.cmdArgs. Default undefined.

      Returns void

    • Experimental

      Formats an arguments object into a command-line string of arguments.

      Parameters

      • obj: { [key: string]: null | string | number | boolean }

        Arguments to translate.

      • literalFalse: boolean = false

        Optional. If true, false arguments are converted to --key=false. Otherwise false args are --no-key. Default false.

      • equals: boolean = true

        Optional. Whether argument keys should include an equals character (e.g., --key=false). Default true.

      Returns string