@brazilian-utils/format-cpf

Return CPF formatted with mask.

Stats

StarsIssuesVersionUpdatedCreatedSize
@brazilian-utils/format-cpf
200.1.83 years ago4 years agoMinified + gzip package size for @brazilian-utils/format-cpf in KB

Readme

@brazilian-utils/format-cpf

Return CPF formatted with mask.

Installation

# Yarn
yarn add @brazilian-utils/format-cpf

# npm
npm install @brazilian-utils/format-cpf --save

# UMD
<script type='text/javascript' src='https://unpkg.com/@brazilian-utils/format-cpf/dist/index.umd.js'></script>

Usage

import formatCpf from '@brazilian-utils/format-cpf';

formatCpf('943'); // 943
formatCpf('9438'); // 943.8
formatCpf('943895751'); // 943.895.751
formatCpf('94389575104'); // 943.895.751-04

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.