Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

js-format-cpf

juliosilvacwb45ISC1.4.0TypeScript support: included

Lib to format CPF

cpf, format, formatar

readme

js-format-cpf

Lib to format CPF

Javascript example:

const cpf = require('js-format-cpf');  
console.log(cpf.formatCPF("49075215029"))

Output: 490.752.150-29

Typescript example:

import { formatCPF } from 'js-format-cpf'
console.log(formatCPF("49075215029")

Output: 490.752.150-29