UNPKG

brazilian-values

Version:

Validates and formats brazilian values, like money (BRL), CPF, CNPJ, dates etc.

22 lines (21 loc) 579 B
export declare type DigitCharacterNode = { kind: 'digit'; /** The digit number. */ digit: number; character: string; }; export declare type OtherCharacterNode = { kind: 'other'; character: string; }; export declare type RootCharacterNode = { kind: 'root'; digits: number; children: (DigitCharacterNode | OtherCharacterNode)[]; }; /** * Parses the received `string` value to a tree of characters. * @param value */ declare const parseToCharacters: (value: string) => RootCharacterNode; export default parseToCharacters;