brazilian-values
Version:
Validates and formats brazilian values, like money (BRL), CPF, CNPJ, dates etc.
17 lines (16 loc) • 396 B
TypeScript
/**
* Formats step-by-step a `string` value into a CPF.
* @example ```js
* formatToCPF('00000000')
* //=> '000.000.00'
*
* formatToCPF('00000000000')
* //=> '000.000.000-00'
*
* formatToCPF('366.418.768-70')
* //=> '366.418.768-70'
* ```
* @param value - A `string` value of a CPF.
*/
declare const formatToCPF: (value: string) => string;
export default formatToCPF;