2.2.1 • Published 4 years ago

@sorg/log v2.2.1

Weekly downloads
157
License
MIT
Repository
github
Last release
4 years ago

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

2.2.1

4 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

5 years ago