2.2.1 • Published 4 years ago
@sorg/log v2.2.1
@sorg/log
Note: this package has been renamed to suf-log and is therefore deprecated.
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.