UNPKG

modern-api.styledlog

Version:

log content in custom css style based on

38 lines (36 loc) 1.04 kB
/** * create log style * * @param {Record<string, string>} styles - custom text style * @returns {(text: any) => string[]} - callback to format text */ declare const styled: (styles: Record<string, string>) => (text: any) => string[]; /** * output formatted texts via `console.log` * * @param {...(string[])} texts - formatted text to output * @returns {void} */ declare const log: (...texts: (string[])[]) => void; /** * output formatted texts via `console.warn` * * @param {...(string[])} texts - formatted text to output * @returns {void} */ declare const warn: (...texts: (string[])[]) => void; /** * output formatted texts via `console.error` * * @param {...(string[])} texts - formatted text to output * @returns {void} */ declare const error: (...texts: (string[])[]) => void; /** * output formatted texts via `console.debug` * * @param {...(string[])} texts - formatted text to output * @returns {void} */ declare const debug: (...texts: (string[])[]) => void; export { debug, error, log, styled, warn };