js-format-cpf-cnpj
v1.4.0
Published
Lib to format CPF or CNPJ
Downloads
170
Readme
js-format-cpf-cnpj
Lib to format CPF or CNPJ
Javascript CNPJ example:
const format = require('js-format-cpf-cnpj');
console.log(format.formatCPForCNPJ("49623477000112"))
Output: 49.623.477/0001-12
Typescript CNPJ example:
import { formatCPForCNPJ } from 'js-format-cpf-cnpj'
console.log(formatCPForCNPJ("49623477000112")
Output: 49.623.477/0001-12
Javascript CPF example:
const format = require('js-format-cpf-cnpj');
console.log(format.formatCPForCNPJ("49075215029"))
Output: 490.752.150-29
Typescript CPF example:
import { formatCPForCNPJ } from 'js-format-cpf-cnpj'
console.log(formatCPForCNPJ("49075215029")
Output: 490.752.150-29