feat: add en readme
This commit is contained in:
parent
11ed6d239c
commit
331cd30754
3 changed files with 42 additions and 13 deletions
27
README.en.md
Normal file
27
README.en.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
Library with functions for Brazilian data formatting.
|
||||
|
||||
CPF/CNPJ: Returns either CPF or CNPJ format based on the input length.
|
||||
|
||||
```js
|
||||
import { formatarCep } from "lhmask";
|
||||
|
||||
console.log(formatarCep("12345000")); // Output: 12.345-000
|
||||
|
||||
console.log(formatarCnpj("12123456000100")); // Output 12.123.456/0001-00
|
||||
|
||||
console.log(formatarCpf("12345678900")); // Output: 123.456.789-00
|
||||
|
||||
console.log(formatarCpfCnpj("12123456000100")); // Output 12.123.456/0001-00
|
||||
|
||||
console.log(formatarCpfCnpj("12345678900")); // Output: 123.456.789-00
|
||||
|
||||
console.log(formatarContaBancaria("12345")); // Output: 1234-5
|
||||
|
||||
console.log(formatarTelefone("88912341234")); // Output: (88)91234-1234.
|
||||
console.log(formatarTelefone("8834001234")); // Output: (88)3400-1234.
|
||||
console.log(formatarTelefone("08001234567")); // Output: 0800-123-4567
|
||||
|
||||
// Returns the formatted value according to the specified string.
|
||||
// Possible values: cep, cpf, cnpj, cpfcnpj, contabancaria.
|
||||
console.log(formatarValor("12345", "contabancaria")); // Output: 1234-5
|
||||
```
|
24
README.md
24
README.md
|
@ -1,4 +1,6 @@
|
|||
# README #
|
||||
# README
|
||||
|
||||
🔗 [English version here](README.en.md)
|
||||
|
||||
Biblioteca com funções para formatação de dados.
|
||||
|
||||
|
@ -7,23 +9,23 @@ CPF/CNPJ: Retorna no CPF ou CNPJ de Acordo com o Tamanho da Entrada.
|
|||
### Exemplos
|
||||
|
||||
```js
|
||||
import { formatarCep } from 'lhmask';
|
||||
import { formatarCep } from "lhmask";
|
||||
|
||||
console.log(formatarCep('12345000')); // Saída: 12.345-000
|
||||
console.log(formatarCep("12345000")); // Saída: 12.345-000
|
||||
|
||||
console.log(formatarCnpj('12123456000100')); // Saída 12.123.456/0001-00
|
||||
console.log(formatarCnpj("12123456000100")); // Saída 12.123.456/0001-00
|
||||
|
||||
console.log(formatarCpf('12345678900')); // Saída: 123.456.789-00
|
||||
console.log(formatarCpf("12345678900")); // Saída: 123.456.789-00
|
||||
|
||||
console.log(formatarCpfCnpj('12123456000100')); // Saída 12.123.456/0001-00
|
||||
console.log(formatarCpfCnpj("12123456000100")); // Saída 12.123.456/0001-00
|
||||
|
||||
console.log(formatarCpfCnpj('12345678900')); // Saída: 123.456.789-00
|
||||
console.log(formatarCpfCnpj("12345678900")); // Saída: 123.456.789-00
|
||||
|
||||
console.log(formatarContaBancaria('12345')); // Saída: 1234-5
|
||||
console.log(formatarContaBancaria("12345")); // Saída: 1234-5
|
||||
|
||||
console.log(formatarTelefone('88912341234')); // Saída: (88)91234-1234.
|
||||
console.log(formatarTelefone('8834001234')); // Saída: (88)3400-1234.
|
||||
console.log(formatarTelefone('08001234567')); // Saída: 0800-123-4567
|
||||
console.log(formatarTelefone("88912341234")); // Saída: (88)91234-1234.
|
||||
console.log(formatarTelefone("8834001234")); // Saída: (88)3400-1234.
|
||||
console.log(formatarTelefone("08001234567")); // Saída: 0800-123-4567
|
||||
|
||||
// Retorna no formado especificado pela string.
|
||||
// possíveis valores: cep, cpf, cnpj, cpfcnpj, contabancaria.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "lhmask-dev",
|
||||
"version": "1.1.7",
|
||||
"version": "1.1.8",
|
||||
"description": "Biblioteca com funções para formatação de dados.",
|
||||
"main": "src/lhmask.js",
|
||||
"scripts": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue