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

    Aliases

    Args

    A completed args object.

    Interactive

    Public alias for internal prompting methods.

    Outputters

    • 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.

    Outputters (Pre-formatted)

    Static

    Terminal

    • 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

    Utilities

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

    Misc.