npm.io
2.2.1 • Published 5 years ago

@sorg/log

Licence
MIT
Version
2.2.1
Deps
1
Size
21 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

@sorg/log

Note: this package has been renamed to suf-log and is therefore deprecated.

circleci Custom npmV min install githubLastCommit

Docs

interfaces

LogStyle

/**
 * color/background/font-weight work in node and the browser, the other properties only work in the browser.
 */
type LogStyle = string | {
    background?: string;
    color?: string;
    padding?: string;
    margin?: string;
    border?: string;
    /** for bold text in node add the value 'bold' */
    'font-weight'?: FontWeightProperty;
    /** if true the style doesn't get reset in node. */
    [key: string]: number | boolean | string | undefined;
}
ConverterInput
type ConverterInput = AcceptableTypes | Array<AcceptableTypes>;
LogMessage
type LogMessage = {
    message: string;
    style?: LogStyle;
}
LogTable
type LogTable = (number | string | LogMessage)[][];
loggers
Log
function Log(...messages: (string | LogMessage)[]): void;
LogTableOptions
interface LogTableOptions {
    padding?: number;
    spacing?: number;
}
LogTable
/**Logs a table in node. */
function LogTable(table: LogTable, options?: LogTableOptions): void;
styler
styler
function styler(input: string, style?: LogStyle): string;

Generated with suf-cli

License

Copyright (c) 2020 Leonard Grosoli Licensed under the MIT license.

Keywords