json-colorizer
Version:
A library to format JSON with colors for display in the console
11 lines (10 loc) • 367 B
TypeScript
import { TokenType } from './lexer';
import * as colorette from 'colorette';
import { Color } from 'colorette';
export { colorette as color };
export type ColorTheme = Record<TokenType, Color>;
export type ColorizeOptions = {
colors?: ColorTheme;
indent?: number;
};
export declare function colorize(json: string | object, options?: ColorizeOptions): string;