UNPKG

json-colorizer

Version:

A library to format JSON with colors for display in the console

11 lines (10 loc) 368 B
export type TokenType = 'Whitespace' | 'Brace' | 'Bracket' | 'Colon' | 'Comma' | 'NumberLiteral' | 'StringKey' | 'StringLiteral' | 'BooleanLiteral' | 'NullLiteral'; export type TokenDefinition = { regex: RegExp; tokenType: TokenType; }; export type Token = { type: TokenType; value: string; }; export declare function tokenize(input: string): Token[];