Utility TypeScript @ 2.0.0-beta.6
    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.

    Implements

    Index

    A completed args object.

    Public alias for internal prompting methods.

    • Experimental

      Outputs the given message to the console prefixed with a timestamp.

      Parameters

      • ...args: [
            variable: { [key: string]: unknown },
            args?: Partial<VariableInspector.Args> & {
                msg?: RecursivePartial<
                    Partial<MessageMaker.MsgArgs> & Omit<TimestampedArgs, "time">,
                >;
                time?: RecursivePartial<
                    Partial<MessageMaker.MsgArgs> & Partial<
                        Omit<
                            MessageMaker.MsgArgs,
                            (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...)
                            | (...),
                        > & { date: Date; stamp: (...) | (...) },
                    >,
                >;
            },
        ]

      Returns void

      2.0.0-beta.3 — Use NodeConsole.vi.timestamp.log instead.

    • Experimental

      Outputs a heading string to the console.

      Parameters

      • heading: string
      • level: number
      • _args: RecursivePartial<
            Omit<NodeConsole.MsgArgs & BulkMsgArgs, "linesIn" | "linesOut">,
        > = {}
      • Optionalvia: OutputMethod

        Default required methods included for different 'levels' of output.

        N.B.: 'verbose' is used as a more discriptive version of default loggers' 'info' method.

        • "debug"
        • "error"
        • "log"
        • "verbose"
        • "warn"

      Returns void

      MessageMaker.msg Used to format the message.

      2.0.0-beta.3 — Create wrapper functions for more project-specfic formatting to replace this method.

    • Experimental

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

      Parameters

      • cmd: string

        Command to run in the terminal.

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

        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 string

    • Experimental

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

      Parameters

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

        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

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