diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..ef3ca46 --- /dev/null +++ b/README.en.md @@ -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 +``` diff --git a/README.md b/README.md index c1c19ca..b408bd4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# README # +# README + +šŸ”— [English version here](README.en.md) Biblioteca com funƧƵes para formatação de dados. @@ -7,25 +9,25 @@ 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. console.log(formatarValor("12345", "contabancaria")); // SaĆ­da: 1234-5 -``` \ No newline at end of file +``` diff --git a/package.json b/package.json index d02fe41..d436a1f 100644 --- a/package.json +++ b/package.json @@ -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": {