@kodatec/brasil-utils 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,157 @@
1
+ # @kodatec/brasil-utils
2
+
3
+ Utilitarios para dados brasileiros: formatacao, validacao e mascaras de CPF, CNPJ, CEP, telefone, moeda e mais.
4
+
5
+ - TypeScript com tipos inclusos
6
+ - ESM e CommonJS
7
+ - Zero dependencias em runtime
8
+ - Configuracoes de mascara compativeis com IMask
9
+
10
+ ## Instalacao
11
+
12
+ ```bash
13
+ npm install @kodatec/brasil-utils
14
+ ```
15
+
16
+ ## Uso
17
+
18
+ ```ts
19
+ import {
20
+ validarCPF,
21
+ formataCpf,
22
+ maskCpf,
23
+ getUfs,
24
+ } from '@kodatec/brasil-utils'
25
+ ```
26
+
27
+ ## API
28
+
29
+ ### Validacao
30
+
31
+ | Funcao | Descricao |
32
+ |---|---|
33
+ | `validarCPF(cpf)` | Valida CPF (aceita com ou sem mascara) |
34
+ | `validarCNPJ(cnpj)` | Valida CNPJ (aceita com ou sem mascara) |
35
+ | `isValidDate(dateString)` | Valida data no formato `DD/MM/YYYY` |
36
+ | `isValidDateMesAno(dateString)` | Valida mes/ano no formato `MM/YYYY` |
37
+
38
+ ```ts
39
+ validarCPF('123.456.789-09') // true | false
40
+ validarCNPJ('11.222.333/0001-81') // true | false
41
+ isValidDate('31/12/2025') // true
42
+ isValidDateMesAno('13/2025') // false
43
+ ```
44
+
45
+ ### Formatacao
46
+
47
+ #### Documentos
48
+
49
+ | Funcao | Descricao |
50
+ |---|---|
51
+ | `formataCpf(cpf, mascarar?)` | Formata CPF. `mascarar=true` (padrao) oculta digitos: `***.456.789-**` |
52
+ | `formataCnpj(cnpj, mascarar?)` | Formata CNPJ. `mascarar=false` (padrao) exibe completo |
53
+ | `formataNis(nis)` | Formata NIS/PIS/PASEP: `123.45678.90-1` |
54
+ | `formataCep(cep)` | Formata CEP: `12345-678` |
55
+ | `formataTelefone(telefone)` | Formata telefone fixo ou celular: `(11) 99999-9999` |
56
+
57
+ ```ts
58
+ formataCpf('12345678909') // '***.$2.$3-**'
59
+ formataCpf('12345678909', false) // '123.456.789-09'
60
+ formataCnpj('11222333000181') // '11.222.333/0001-81'
61
+ formataTelefone('11999998888') // '(11) 99999-8888'
62
+ ```
63
+
64
+ #### Moeda
65
+
66
+ | Funcao | Descricao |
67
+ |---|---|
68
+ | `formataMoedaReais(valor)` | Formata numero para moeda BRL: `R$ 1.234,56` |
69
+
70
+ ```ts
71
+ formataMoedaReais(1234.5) // 'R$ 1.234,50'
72
+ ```
73
+
74
+ #### Nomes
75
+
76
+ | Funcao | Descricao |
77
+ |---|---|
78
+ | `formataNome(nome)` | Primeiro + ultimo nome: `Alex Furtunato` |
79
+ | `formataNomePessoal(nome)` | Nome completo com preposicoes em minusculo: `Alex Fabiano de Araujo Furtunato` |
80
+
81
+ ```ts
82
+ formataNome('ALEX FABIANO DE ARAÚJO FURTUNATO')
83
+ // 'Alex Furtunato'
84
+
85
+ formataNomePessoal('ALEX FABIANO DE ARAÚJO FURTUNATO')
86
+ // 'Alex Fabiano de Araújo Furtunato'
87
+ ```
88
+
89
+ #### Datas
90
+
91
+ | Funcao | Descricao |
92
+ |---|---|
93
+ | `formataDataRetirandoHora(datastr)` | `"2025-05-21T17:57:10"` → `"21/05/2025"` |
94
+ | `formataDataFromDb(datastr)` | `"2025-05-21"` → `"21/05/2025"` |
95
+ | `formataDataHoraFromDb(datastr)` | Data e hora do banco para `pt-BR` |
96
+ | `formataDiaMesFromDb(datastr)` | `"21/05"` |
97
+ | `formataDataInt(datastr)` | `7022025` → `"07/02/2025"` |
98
+ | `mudaFormatoDataSep(datastr)` | Alterna entre `DD/MM/YYYY` e `YYYY-MM-DD` |
99
+ | `converterParaDataIso(dataString)` | `DD/MM/YYYY` → `YYYY/MM/DD` |
100
+ | `mudaFormatoMesAno(datastr)` | Alterna entre `MM/YYYY` e `YYYY-MM` |
101
+ | `formataDataMesReferencia(data)` | `"2025-05"` → `"05/2025"` |
102
+ | `formatarDataExtrato(data)` | Inteiro para data formatada |
103
+
104
+ #### Arquivo
105
+
106
+ | Funcao | Descricao |
107
+ |---|---|
108
+ | `formataTamanhoArquivo(bytes)` | `1024` → `"1 KB"` |
109
+
110
+ ### Normalizacao
111
+
112
+ | Funcao | Descricao |
113
+ |---|---|
114
+ | `removeAcentos(texto)` | Remove acentos: `"Sao Paulo"` → `"Sao Paulo"` |
115
+ | `removeMascara(valor)` | Remove tudo exceto digitos |
116
+ | `removerPontuacao(valor)` | Remove pontuacao de documentos, preserva nomes |
117
+
118
+ ```ts
119
+ removeAcentos('São Paulo') // 'Sao Paulo'
120
+ removeMascara('123.456.789-09') // '12345678909'
121
+ removerPontuacao('123.456.789-09') // '12345678909'
122
+ removerPontuacao('João da Silva') // 'João da Silva' (mantém)
123
+ ```
124
+
125
+ ### Mascaras (IMask)
126
+
127
+ Configuracoes prontas para uso com [IMask](https://imask.js.org/):
128
+
129
+ | Constante | Mascara |
130
+ |---|---|
131
+ | `maskCpf` | `000.000.000-00` |
132
+ | `maskCnpj` | `00.000.000/0000-00` |
133
+ | `maskCpfCnpj` | Dinamica: CPF ou CNPJ conforme digitacao |
134
+ | `maskCep` | `00000-000` |
135
+ | `maskTelefone` | Dinamica: fixo `(00) 0000-0000` ou celular `(00) 00000-0000` |
136
+ | `maskNis` | `000.00000.00-0` |
137
+ | `maskMoeda` | Numero com separador de milhar `.` e decimal `,` |
138
+ | `maskData` | `00/00/0000` |
139
+ | `maskMesAno` | `00/0000` |
140
+
141
+ ```ts
142
+ import IMask from 'imask'
143
+ import { maskCpf } from '@kodatec/brasil-utils'
144
+
145
+ IMask(element, maskCpf)
146
+ ```
147
+
148
+ ### Constantes
149
+
150
+ | Funcao | Descricao |
151
+ |---|---|
152
+ | `getUfs()` | Lista das 27 UFs brasileiras `{ sigla, nome }` |
153
+ | `localePtBr()` | Traducao pt-BR para PrimeVue/PrimeReact |
154
+
155
+ ## Licenca
156
+
157
+ MIT
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function c(){return[{sigla:"AC",nome:"Acre"},{sigla:"AL",nome:"Alagoas"},{sigla:"AP",nome:"Amapá"},{sigla:"AM",nome:"Amazonas"},{sigla:"BA",nome:"Bahia"},{sigla:"CE",nome:"Ceará"},{sigla:"DF",nome:"Distrito Federal"},{sigla:"ES",nome:"Espírito Santo"},{sigla:"GO",nome:"Goiás"},{sigla:"MA",nome:"Maranhão"},{sigla:"MT",nome:"Mato Grosso"},{sigla:"MS",nome:"Mato Grosso do Sul"},{sigla:"MG",nome:"Minas Gerais"},{sigla:"PA",nome:"Pará"},{sigla:"PB",nome:"Paraíba"},{sigla:"PR",nome:"Paraná"},{sigla:"PE",nome:"Pernambuco"},{sigla:"PI",nome:"Piauí"},{sigla:"RJ",nome:"Rio de Janeiro"},{sigla:"RN",nome:"Rio Grande do Norte"},{sigla:"RS",nome:"Rio Grande do Sul"},{sigla:"RO",nome:"Rondônia"},{sigla:"RR",nome:"Roraima"},{sigla:"SC",nome:"Santa Catarina"},{sigla:"SP",nome:"São Paulo"},{sigla:"SE",nome:"Sergipe"},{sigla:"TO",nome:"Tocantins"}]}function d(){return{startsWith:"Começa com",contains:"Contém",notContains:"Não contém",endsWith:"Termina com",equals:"Igual",notEquals:"Diferente",noFilter:"Sem Filtro",filter:"Filtro",lt:"Menor que",lte:"Menor ou igual a",gt:"Maior que",gte:"Maior ou igual a",dateIs:"Data é",dateIsNot:"Data não é",dateBefore:"Data antes de",dateAfter:"Data depois de",custom:"Personalizado",clear:"Limpar",apply:"Aplicar",matchAll:"Corresponder Todos",matchAny:"Corresponder Qualquer",addRule:"Adicionar Regra",removeRule:"Remover Regra",accept:"Sim",reject:"Não",choose:"Escolher",upload:"Enviar",cancel:"Cancelar",completed:"Concluído",pending:"Pendente",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayNamesMin:["D","S","T","Q","Q","S","S"],monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],chooseYear:"Escolher Ano",chooseMonth:"Escolher Mês",chooseDate:"Escolher Data",prevDecade:"Década Anterior",nextDecade:"Próxima Década",prevYear:"Ano Anterior",nextYear:"Próximo Ano",prevMonth:"Mês Anterior",nextMonth:"Próximo Mês",prevHour:"Hora Anterior",nextHour:"Próxima Hora",prevMinute:"Minuto Anterior",nextMinute:"Próximo Minuto",prevSecond:"Segundo Anterior",nextSecond:"Próximo Segundo",am:"AM",pm:"PM",today:"Hoje",now:"Agora",weekHeader:"Sem",firstDayOfWeek:0,showMonthAfterYear:!1,dateFormat:"dd/MM/yy",weak:"Fraco",medium:"Médio",strong:"Forte",passwordPrompt:"Digite uma senha",emptyFilterMessage:"Nenhum resultado encontrado",searchMessage:"Existem {0} resultados disponíveis",selectionMessage:"{0} itens selecionados",emptySelectionMessage:"Nenhum item selecionado",emptySearchMessage:"Nenhum resultado encontrado",emptyMessage:"Nenhuma opção disponível",aria:{trueLabel:"Verdadeiro",falseLabel:"Falso",nullLabel:"Não Selecionado",star:"1 estrela",stars:"{star} estrelas",selectAll:"Todos os itens selecionados",unselectAll:"Todos os itens desmarcados",close:"Fechar",previous:"Anterior",next:"Próximo",navigation:"Navegação",scrollTop:"Rolar para o Topo",moveTop:"Mover para o Topo",moveUp:"Mover para Cima",moveDown:"Mover para Baixo",moveBottom:"Mover para o Final",moveToTarget:"Mover para o Destino",moveToSource:"Mover para a Origem",moveAllToTarget:"Mover Todos para o Destino",moveAllToSource:"Mover Todos para a Origem",pageLabel:"Página {page}",firstPageLabel:"Primeira Página",lastPageLabel:"Última Página",nextPageLabel:"Próxima Página",previousPageLabel:"Página Anterior",rowsPerPageLabel:"Linhas por página",jumpToPageDropdownLabel:"Ir para a Página",jumpToPageInputLabel:"Ir para a Página",selectRow:"Linha Selecionada",unselectRow:"Linha Desmarcada",expandRow:"Expandir Linha",collapseRow:"Recolher Linha",showFilterMenu:"Mostrar Menu de Filtro",hideFilterMenu:"Esconder Menu de Filtro",filterOperator:"Operador de Filtro",filterConstraint:"Restrição de Filtro",editRow:"Editar Linha",saveEdit:"Salvar Edição",cancelEdit:"Cancelar Edição",listView:"Visualização de Lista",gridView:"Visualização de Grade",slide:"Deslizar",slideNumber:"Slide {slideNumber}",zoomImage:"Ampliar Imagem",zoomIn:"Ampliar",zoomOut:"Reduzir",rotateRight:"Rotacionar para a Direita",rotateLeft:"Rotacionar para a Esquerda"}}}function g(e,a=!0){return e?a?e.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/,"***.$2.$3-**"):e.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/,"$1.$2.$3-$4"):""}function p(e,a=!1){return e?a?e.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/,"**.$2.$3/$4-**"):e.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/,"$1.$2.$3/$4-$5"):""}function f(e){return e?e.replace(/(\d{3})(\d{5})(\d{2})(\d{1})/,"$1.$2.$3-$4"):""}function h(e){return e?e.replace(/(\d{5})(\d{3})/,"$1-$2"):""}function M(e){return e?e.length===10?e.replace(/(\d{2})(\d{4})(\d{4})/,"($1) $2-$3"):e.length===11?e.replace(/(\d{2})(\d{5})(\d{4})/,"($1) $2-$3"):e:""}function D(e){return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(e)}const S=["da","de","do","das","dos","e"];function i(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function P(e){if(!e)return"";const a=e.split(" ");return a.length>=2?`${i(a[0])} ${i(a[a.length-1])}`:i(a[0])}function $(e){return e?e.split(" ").map(o=>S.includes(o.toLowerCase())?o.toLowerCase():i(o)).join(" "):""}function A(e){if(!e)return"";const a=new Date(e),o=String(a.getDate()).padStart(2,"0"),t=String(a.getMonth()+1).padStart(2,"0"),r=a.getFullYear();return`${o}/${t}/${r}`}function v(e){return new Date(e+"T00:00:00").toLocaleDateString("pt-BR")}function b(e){return new Date(e+"Z").toLocaleString("pt-BR")}function C(e){const a=new Date(e+"Z"),o=String(a.getDate()).padStart(2,"0"),t=String(a.getMonth()+1).padStart(2,"0");return`${o}/${t}`}function R(e){if(!e)return"";const a=e.toString(),o=a.length===7?"0"+a.substring(0,1):a.substring(0,2),t=a.length===7?a.substring(1,3):a.substring(2,4),r=a.substring(a.length-4);return`${o}/${t}/${r}`}function F(e){if(!e)return"";if(e.includes("/")){const a=e.split("/");return`${a[2]}-${a[1]}-${a[0]}`}if(e.includes("-")){const a=e.split("-");return`${a[2]}/${a[1]}/${a[0]}`}return e}function T(e){const[a,o,t]=e.split("/");return`${t}/${o}/${a}`}function N(e){if(!e)return"";if(e.includes("/")){const a=e.split("/");return`${a[1]}-${a[0]}`}if(e.includes("-")){const a=e.split("-");return`${a[1]}/${a[0]}`}return e}function k(e){if(!e)return"";const a=e.split("-");return a.length===3?`${a[1]}/${a[0]}`:a.length===2?`${a[0]}/${a[1]}`:""}function w(e){if(!e)return"";const a=e.toString(),o=a.length===7?"0"+a[0]:a.substring(0,2),t=a.length===7?a.substring(1,3):a.substring(2,4),r=a.slice(-4);return`${o}/${t}/${r}`}function B(e){const a=["Bytes","KB","MB","GB","TB"];if(e===0)return"0 Byte";const o=Math.floor(Math.log(e)/Math.log(1024));return Math.round(e/Math.pow(1024,o))+" "+a[o]}function L(e){if(e=e.replace(/[^\d]+/g,""),e.length!==11||/^(\d)\1+$/.test(e))return!1;let a=0;for(let t=0;t<9;t++)a+=parseInt(e.charAt(t))*(10-t);let o=a*10%11;if((o===10||o===11)&&(o=0),o!==parseInt(e.charAt(9)))return!1;a=0;for(let t=0;t<10;t++)a+=parseInt(e.charAt(t))*(11-t);return o=a*10%11,(o===10||o===11)&&(o=0),o===parseInt(e.charAt(10))}function x(e){if(e=e.replace(/[^\d]+/g,""),e.length!==14||/^(\d)\1+$/.test(e))return!1;const a=(u,s)=>{let l=0;for(let n=0;n<s.length;n++)l+=parseInt(u[n])*s[n];const m=l%11;return m<2?0:11-m},o=e.slice(0,12),t=a(o,[5,4,3,2,9,8,7,6,5,4,3,2]),r=a(o+t,[6,5,4,3,2,9,8,7,6,5,4,3,2]);return e===o+t+""+r}function E(e){const[a,o,t]=e.split("/").map(Number),r=new Date(t,o-1,a);return r.getFullYear()===t&&r.getMonth()+1===o&&r.getDate()===a}function I(e){const[a,o]=e.split("/").map(Number),t=new Date(o,a-1,1);return isNaN(t.getTime())?!1:t.getMonth()+1===a&&t.getFullYear()===o}function y(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/ç/g,"c").replace(/Ç/g,"C")}function z(e){return e?e.replace(/[^0-9]/g,""):""}function O(e){if(!e)return e;const a=e.trim(),o=(a.match(/\d/g)||[]).length,t=(a.match(/[a-zA-ZÀ-ÿ]/g)||[]).length;return o>t?e.replace(/\s+/g,"").replace(/[.\-/]/g,""):e}const G={mask:"000.000.000-00"},H={mask:"00.000.000/0000-00"},J={mask:[{mask:"000.000.000-00"},{mask:"00.000.000/0000-00"}],dispatch:(e,a)=>a.value.replace(/\D/g,"").length<=11?0:1},V={mask:"00000-000"},q={mask:[{mask:"(00) 0000-0000"},{mask:"(00) 00000-0000"}],dispatch:(e,a)=>a.value.replace(/\D/g,"").length<=10?0:1},Y={mask:"000.00000.00-0"},Q={mask:Number,scale:2,thousandsSeparator:".",padFractionalZeros:!0,normalizeZeros:!0,radix:",",mapToRadix:["."],min:0},Z={mask:"00/00/0000"},j={mask:"00/0000"};exports.converterParaDataIso=T;exports.formataCep=h;exports.formataCnpj=p;exports.formataCpf=g;exports.formataDataFromDb=v;exports.formataDataHoraFromDb=b;exports.formataDataInt=R;exports.formataDataMesReferencia=k;exports.formataDataRetirandoHora=A;exports.formataDiaMesFromDb=C;exports.formataMoedaReais=D;exports.formataNis=f;exports.formataNome=P;exports.formataNomePessoal=$;exports.formataTamanhoArquivo=B;exports.formataTelefone=M;exports.formatarDataExtrato=w;exports.getUfs=c;exports.isValidDate=E;exports.isValidDateMesAno=I;exports.localePtBr=d;exports.maskCep=V;exports.maskCnpj=H;exports.maskCpf=G;exports.maskCpfCnpj=J;exports.maskData=Z;exports.maskMesAno=j;exports.maskMoeda=Q;exports.maskNis=Y;exports.maskTelefone=q;exports.mudaFormatoDataSep=F;exports.mudaFormatoMesAno=N;exports.removeAcentos=y;exports.removeMascara=z;exports.removerPontuacao=O;exports.validarCNPJ=x;exports.validarCPF=L;
@@ -0,0 +1,366 @@
1
+ function d() {
2
+ return [
3
+ { sigla: "AC", nome: "Acre" },
4
+ { sigla: "AL", nome: "Alagoas" },
5
+ { sigla: "AP", nome: "Amapá" },
6
+ { sigla: "AM", nome: "Amazonas" },
7
+ { sigla: "BA", nome: "Bahia" },
8
+ { sigla: "CE", nome: "Ceará" },
9
+ { sigla: "DF", nome: "Distrito Federal" },
10
+ { sigla: "ES", nome: "Espírito Santo" },
11
+ { sigla: "GO", nome: "Goiás" },
12
+ { sigla: "MA", nome: "Maranhão" },
13
+ { sigla: "MT", nome: "Mato Grosso" },
14
+ { sigla: "MS", nome: "Mato Grosso do Sul" },
15
+ { sigla: "MG", nome: "Minas Gerais" },
16
+ { sigla: "PA", nome: "Pará" },
17
+ { sigla: "PB", nome: "Paraíba" },
18
+ { sigla: "PR", nome: "Paraná" },
19
+ { sigla: "PE", nome: "Pernambuco" },
20
+ { sigla: "PI", nome: "Piauí" },
21
+ { sigla: "RJ", nome: "Rio de Janeiro" },
22
+ { sigla: "RN", nome: "Rio Grande do Norte" },
23
+ { sigla: "RS", nome: "Rio Grande do Sul" },
24
+ { sigla: "RO", nome: "Rondônia" },
25
+ { sigla: "RR", nome: "Roraima" },
26
+ { sigla: "SC", nome: "Santa Catarina" },
27
+ { sigla: "SP", nome: "São Paulo" },
28
+ { sigla: "SE", nome: "Sergipe" },
29
+ { sigla: "TO", nome: "Tocantins" }
30
+ ];
31
+ }
32
+ function g() {
33
+ return {
34
+ startsWith: "Começa com",
35
+ contains: "Contém",
36
+ notContains: "Não contém",
37
+ endsWith: "Termina com",
38
+ equals: "Igual",
39
+ notEquals: "Diferente",
40
+ noFilter: "Sem Filtro",
41
+ filter: "Filtro",
42
+ lt: "Menor que",
43
+ lte: "Menor ou igual a",
44
+ gt: "Maior que",
45
+ gte: "Maior ou igual a",
46
+ dateIs: "Data é",
47
+ dateIsNot: "Data não é",
48
+ dateBefore: "Data antes de",
49
+ dateAfter: "Data depois de",
50
+ custom: "Personalizado",
51
+ clear: "Limpar",
52
+ apply: "Aplicar",
53
+ matchAll: "Corresponder Todos",
54
+ matchAny: "Corresponder Qualquer",
55
+ addRule: "Adicionar Regra",
56
+ removeRule: "Remover Regra",
57
+ accept: "Sim",
58
+ reject: "Não",
59
+ choose: "Escolher",
60
+ upload: "Enviar",
61
+ cancel: "Cancelar",
62
+ completed: "Concluído",
63
+ pending: "Pendente",
64
+ fileSizeTypes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
65
+ dayNames: ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"],
66
+ dayNamesShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
67
+ dayNamesMin: ["D", "S", "T", "Q", "Q", "S", "S"],
68
+ monthNames: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
69
+ monthNamesShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"],
70
+ chooseYear: "Escolher Ano",
71
+ chooseMonth: "Escolher Mês",
72
+ chooseDate: "Escolher Data",
73
+ prevDecade: "Década Anterior",
74
+ nextDecade: "Próxima Década",
75
+ prevYear: "Ano Anterior",
76
+ nextYear: "Próximo Ano",
77
+ prevMonth: "Mês Anterior",
78
+ nextMonth: "Próximo Mês",
79
+ prevHour: "Hora Anterior",
80
+ nextHour: "Próxima Hora",
81
+ prevMinute: "Minuto Anterior",
82
+ nextMinute: "Próximo Minuto",
83
+ prevSecond: "Segundo Anterior",
84
+ nextSecond: "Próximo Segundo",
85
+ am: "AM",
86
+ pm: "PM",
87
+ today: "Hoje",
88
+ now: "Agora",
89
+ weekHeader: "Sem",
90
+ firstDayOfWeek: 0,
91
+ showMonthAfterYear: !1,
92
+ dateFormat: "dd/MM/yy",
93
+ weak: "Fraco",
94
+ medium: "Médio",
95
+ strong: "Forte",
96
+ passwordPrompt: "Digite uma senha",
97
+ emptyFilterMessage: "Nenhum resultado encontrado",
98
+ searchMessage: "Existem {0} resultados disponíveis",
99
+ selectionMessage: "{0} itens selecionados",
100
+ emptySelectionMessage: "Nenhum item selecionado",
101
+ emptySearchMessage: "Nenhum resultado encontrado",
102
+ emptyMessage: "Nenhuma opção disponível",
103
+ aria: {
104
+ trueLabel: "Verdadeiro",
105
+ falseLabel: "Falso",
106
+ nullLabel: "Não Selecionado",
107
+ star: "1 estrela",
108
+ stars: "{star} estrelas",
109
+ selectAll: "Todos os itens selecionados",
110
+ unselectAll: "Todos os itens desmarcados",
111
+ close: "Fechar",
112
+ previous: "Anterior",
113
+ next: "Próximo",
114
+ navigation: "Navegação",
115
+ scrollTop: "Rolar para o Topo",
116
+ moveTop: "Mover para o Topo",
117
+ moveUp: "Mover para Cima",
118
+ moveDown: "Mover para Baixo",
119
+ moveBottom: "Mover para o Final",
120
+ moveToTarget: "Mover para o Destino",
121
+ moveToSource: "Mover para a Origem",
122
+ moveAllToTarget: "Mover Todos para o Destino",
123
+ moveAllToSource: "Mover Todos para a Origem",
124
+ pageLabel: "Página {page}",
125
+ firstPageLabel: "Primeira Página",
126
+ lastPageLabel: "Última Página",
127
+ nextPageLabel: "Próxima Página",
128
+ previousPageLabel: "Página Anterior",
129
+ rowsPerPageLabel: "Linhas por página",
130
+ jumpToPageDropdownLabel: "Ir para a Página",
131
+ jumpToPageInputLabel: "Ir para a Página",
132
+ selectRow: "Linha Selecionada",
133
+ unselectRow: "Linha Desmarcada",
134
+ expandRow: "Expandir Linha",
135
+ collapseRow: "Recolher Linha",
136
+ showFilterMenu: "Mostrar Menu de Filtro",
137
+ hideFilterMenu: "Esconder Menu de Filtro",
138
+ filterOperator: "Operador de Filtro",
139
+ filterConstraint: "Restrição de Filtro",
140
+ editRow: "Editar Linha",
141
+ saveEdit: "Salvar Edição",
142
+ cancelEdit: "Cancelar Edição",
143
+ listView: "Visualização de Lista",
144
+ gridView: "Visualização de Grade",
145
+ slide: "Deslizar",
146
+ slideNumber: "Slide {slideNumber}",
147
+ zoomImage: "Ampliar Imagem",
148
+ zoomIn: "Ampliar",
149
+ zoomOut: "Reduzir",
150
+ rotateRight: "Rotacionar para a Direita",
151
+ rotateLeft: "Rotacionar para a Esquerda"
152
+ }
153
+ };
154
+ }
155
+ function p(e, a = !0) {
156
+ return e ? a ? e.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, "***.$2.$3-**") : e.replace(/(\d{3})(\d{3})(\d{3})(\d{2})/, "$1.$2.$3-$4") : "";
157
+ }
158
+ function f(e, a = !1) {
159
+ return e ? a ? e.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/, "**.$2.$3/$4-**") : e.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/, "$1.$2.$3/$4-$5") : "";
160
+ }
161
+ function h(e) {
162
+ return e ? e.replace(/(\d{3})(\d{5})(\d{2})(\d{1})/, "$1.$2.$3-$4") : "";
163
+ }
164
+ function M(e) {
165
+ return e ? e.replace(/(\d{5})(\d{3})/, "$1-$2") : "";
166
+ }
167
+ function $(e) {
168
+ return e ? e.length === 10 ? e.replace(/(\d{2})(\d{4})(\d{4})/, "($1) $2-$3") : e.length === 11 ? e.replace(/(\d{2})(\d{5})(\d{4})/, "($1) $2-$3") : e : "";
169
+ }
170
+ function S(e) {
171
+ return new Intl.NumberFormat("pt-BR", {
172
+ style: "currency",
173
+ currency: "BRL"
174
+ }).format(e);
175
+ }
176
+ const c = ["da", "de", "do", "das", "dos", "e"];
177
+ function i(e) {
178
+ return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
179
+ }
180
+ function D(e) {
181
+ if (!e) return "";
182
+ const a = e.split(" ");
183
+ return a.length >= 2 ? `${i(a[0])} ${i(a[a.length - 1])}` : i(a[0]);
184
+ }
185
+ function A(e) {
186
+ return e ? e.split(" ").map(
187
+ (t) => c.includes(t.toLowerCase()) ? t.toLowerCase() : i(t)
188
+ ).join(" ") : "";
189
+ }
190
+ function P(e) {
191
+ if (!e) return "";
192
+ const a = new Date(e), t = String(a.getDate()).padStart(2, "0"), r = String(a.getMonth() + 1).padStart(2, "0"), o = a.getFullYear();
193
+ return `${t}/${r}/${o}`;
194
+ }
195
+ function v(e) {
196
+ return (/* @__PURE__ */ new Date(e + "T00:00:00")).toLocaleDateString("pt-BR");
197
+ }
198
+ function R(e) {
199
+ return (/* @__PURE__ */ new Date(e + "Z")).toLocaleString("pt-BR");
200
+ }
201
+ function b(e) {
202
+ const a = /* @__PURE__ */ new Date(e + "Z"), t = String(a.getDate()).padStart(2, "0"), r = String(a.getMonth() + 1).padStart(2, "0");
203
+ return `${t}/${r}`;
204
+ }
205
+ function T(e) {
206
+ if (!e) return "";
207
+ const a = e.toString(), t = a.length === 7 ? "0" + a.substring(0, 1) : a.substring(0, 2), r = a.length === 7 ? a.substring(1, 3) : a.substring(2, 4), o = a.substring(a.length - 4);
208
+ return `${t}/${r}/${o}`;
209
+ }
210
+ function F(e) {
211
+ if (!e) return "";
212
+ if (e.includes("/")) {
213
+ const a = e.split("/");
214
+ return `${a[2]}-${a[1]}-${a[0]}`;
215
+ }
216
+ if (e.includes("-")) {
217
+ const a = e.split("-");
218
+ return `${a[2]}/${a[1]}/${a[0]}`;
219
+ }
220
+ return e;
221
+ }
222
+ function N(e) {
223
+ const [a, t, r] = e.split("/");
224
+ return `${r}/${t}/${a}`;
225
+ }
226
+ function C(e) {
227
+ if (!e) return "";
228
+ if (e.includes("/")) {
229
+ const a = e.split("/");
230
+ return `${a[1]}-${a[0]}`;
231
+ }
232
+ if (e.includes("-")) {
233
+ const a = e.split("-");
234
+ return `${a[1]}/${a[0]}`;
235
+ }
236
+ return e;
237
+ }
238
+ function w(e) {
239
+ if (!e) return "";
240
+ const a = e.split("-");
241
+ return a.length === 3 ? `${a[1]}/${a[0]}` : a.length === 2 ? `${a[0]}/${a[1]}` : "";
242
+ }
243
+ function L(e) {
244
+ if (!e) return "";
245
+ const a = e.toString(), t = a.length === 7 ? "0" + a[0] : a.substring(0, 2), r = a.length === 7 ? a.substring(1, 3) : a.substring(2, 4), o = a.slice(-4);
246
+ return `${t}/${r}/${o}`;
247
+ }
248
+ function x(e) {
249
+ const a = ["Bytes", "KB", "MB", "GB", "TB"];
250
+ if (e === 0) return "0 Byte";
251
+ const t = Math.floor(Math.log(e) / Math.log(1024));
252
+ return Math.round(e / Math.pow(1024, t)) + " " + a[t];
253
+ }
254
+ function B(e) {
255
+ if (e = e.replace(/[^\d]+/g, ""), e.length !== 11 || /^(\d)\1+$/.test(e)) return !1;
256
+ let a = 0;
257
+ for (let r = 0; r < 9; r++) a += parseInt(e.charAt(r)) * (10 - r);
258
+ let t = a * 10 % 11;
259
+ if ((t === 10 || t === 11) && (t = 0), t !== parseInt(e.charAt(9))) return !1;
260
+ a = 0;
261
+ for (let r = 0; r < 10; r++) a += parseInt(e.charAt(r)) * (11 - r);
262
+ return t = a * 10 % 11, (t === 10 || t === 11) && (t = 0), t === parseInt(e.charAt(10));
263
+ }
264
+ function k(e) {
265
+ if (e = e.replace(/[^\d]+/g, ""), e.length !== 14 || /^(\d)\1+$/.test(e)) return !1;
266
+ const a = (m, s) => {
267
+ let l = 0;
268
+ for (let n = 0; n < s.length; n++)
269
+ l += parseInt(m[n]) * s[n];
270
+ const u = l % 11;
271
+ return u < 2 ? 0 : 11 - u;
272
+ }, t = e.slice(0, 12), r = a(t, [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]), o = a(t + r, [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]);
273
+ return e === t + r + "" + o;
274
+ }
275
+ function E(e) {
276
+ const [a, t, r] = e.split("/").map(Number), o = new Date(r, t - 1, a);
277
+ return o.getFullYear() === r && o.getMonth() + 1 === t && o.getDate() === a;
278
+ }
279
+ function I(e) {
280
+ const [a, t] = e.split("/").map(Number), r = new Date(t, a - 1, 1);
281
+ return isNaN(r.getTime()) ? !1 : r.getMonth() + 1 === a && r.getFullYear() === t;
282
+ }
283
+ function y(e) {
284
+ return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/ç/g, "c").replace(/Ç/g, "C");
285
+ }
286
+ function z(e) {
287
+ return e ? e.replace(/[^0-9]/g, "") : "";
288
+ }
289
+ function O(e) {
290
+ if (!e) return e;
291
+ const a = e.trim(), t = (a.match(/\d/g) || []).length, r = (a.match(/[a-zA-ZÀ-ÿ]/g) || []).length;
292
+ return t > r ? e.replace(/\s+/g, "").replace(/[.\-/]/g, "") : e;
293
+ }
294
+ const G = {
295
+ mask: "000.000.000-00"
296
+ }, J = {
297
+ mask: "00.000.000/0000-00"
298
+ }, H = {
299
+ mask: [
300
+ { mask: "000.000.000-00" },
301
+ { mask: "00.000.000/0000-00" }
302
+ ],
303
+ dispatch: (e, a) => a.value.replace(/\D/g, "").length <= 11 ? 0 : 1
304
+ }, Y = {
305
+ mask: "00000-000"
306
+ }, q = {
307
+ mask: [
308
+ { mask: "(00) 0000-0000" },
309
+ { mask: "(00) 00000-0000" }
310
+ ],
311
+ dispatch: (e, a) => a.value.replace(/\D/g, "").length <= 10 ? 0 : 1
312
+ }, Q = {
313
+ mask: "000.00000.00-0"
314
+ }, V = {
315
+ mask: Number,
316
+ scale: 2,
317
+ thousandsSeparator: ".",
318
+ padFractionalZeros: !0,
319
+ normalizeZeros: !0,
320
+ radix: ",",
321
+ mapToRadix: ["."],
322
+ min: 0
323
+ }, Z = {
324
+ mask: "00/00/0000"
325
+ }, U = {
326
+ mask: "00/0000"
327
+ };
328
+ export {
329
+ N as converterParaDataIso,
330
+ M as formataCep,
331
+ f as formataCnpj,
332
+ p as formataCpf,
333
+ v as formataDataFromDb,
334
+ R as formataDataHoraFromDb,
335
+ T as formataDataInt,
336
+ w as formataDataMesReferencia,
337
+ P as formataDataRetirandoHora,
338
+ b as formataDiaMesFromDb,
339
+ S as formataMoedaReais,
340
+ h as formataNis,
341
+ D as formataNome,
342
+ A as formataNomePessoal,
343
+ x as formataTamanhoArquivo,
344
+ $ as formataTelefone,
345
+ L as formatarDataExtrato,
346
+ d as getUfs,
347
+ E as isValidDate,
348
+ I as isValidDateMesAno,
349
+ g as localePtBr,
350
+ Y as maskCep,
351
+ J as maskCnpj,
352
+ G as maskCpf,
353
+ H as maskCpfCnpj,
354
+ Z as maskData,
355
+ U as maskMesAno,
356
+ V as maskMoeda,
357
+ Q as maskNis,
358
+ q as maskTelefone,
359
+ F as mudaFormatoDataSep,
360
+ C as mudaFormatoMesAno,
361
+ y as removeAcentos,
362
+ z as removeMascara,
363
+ O as removerPontuacao,
364
+ k as validarCNPJ,
365
+ B as validarCPF
366
+ };
@@ -0,0 +1,4 @@
1
+ export { getUfs } from './ufs';
2
+ export type { UF } from './ufs';
3
+ export { localePtBr } from './locale';
4
+ export type { LocalePtBr } from './locale';
@@ -0,0 +1,73 @@
1
+ export interface LocalePtBr {
2
+ startsWith: string;
3
+ contains: string;
4
+ notContains: string;
5
+ endsWith: string;
6
+ equals: string;
7
+ notEquals: string;
8
+ noFilter: string;
9
+ filter: string;
10
+ lt: string;
11
+ lte: string;
12
+ gt: string;
13
+ gte: string;
14
+ dateIs: string;
15
+ dateIsNot: string;
16
+ dateBefore: string;
17
+ dateAfter: string;
18
+ custom: string;
19
+ clear: string;
20
+ apply: string;
21
+ matchAll: string;
22
+ matchAny: string;
23
+ addRule: string;
24
+ removeRule: string;
25
+ accept: string;
26
+ reject: string;
27
+ choose: string;
28
+ upload: string;
29
+ cancel: string;
30
+ completed: string;
31
+ pending: string;
32
+ fileSizeTypes: string[];
33
+ dayNames: string[];
34
+ dayNamesShort: string[];
35
+ dayNamesMin: string[];
36
+ monthNames: string[];
37
+ monthNamesShort: string[];
38
+ chooseYear: string;
39
+ chooseMonth: string;
40
+ chooseDate: string;
41
+ prevDecade: string;
42
+ nextDecade: string;
43
+ prevYear: string;
44
+ nextYear: string;
45
+ prevMonth: string;
46
+ nextMonth: string;
47
+ prevHour: string;
48
+ nextHour: string;
49
+ prevMinute: string;
50
+ nextMinute: string;
51
+ prevSecond: string;
52
+ nextSecond: string;
53
+ am: string;
54
+ pm: string;
55
+ today: string;
56
+ now: string;
57
+ weekHeader: string;
58
+ firstDayOfWeek: number;
59
+ showMonthAfterYear: boolean;
60
+ dateFormat: string;
61
+ weak: string;
62
+ medium: string;
63
+ strong: string;
64
+ passwordPrompt: string;
65
+ emptyFilterMessage: string;
66
+ searchMessage: string;
67
+ selectionMessage: string;
68
+ emptySelectionMessage: string;
69
+ emptySearchMessage: string;
70
+ emptyMessage: string;
71
+ aria: Record<string, string>;
72
+ }
73
+ export declare function localePtBr(): LocalePtBr;
@@ -0,0 +1,5 @@
1
+ export interface UF {
2
+ sigla: string;
3
+ nome: string;
4
+ }
5
+ export declare function getUfs(): UF[];
@@ -0,0 +1 @@
1
+ export declare function formataTamanhoArquivo(bytes: number): string;
@@ -0,0 +1 @@
1
+ export declare function formataCep(cep: string): string;
@@ -0,0 +1 @@
1
+ export declare function formataCnpj(cnpj: string, mascarar?: boolean): string;
@@ -0,0 +1 @@
1
+ export declare function formataCpf(cpf: string, mascarar?: boolean): string;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Formata data removendo hora.
3
+ * Entrada: "2025-05-21T17:57:10.058390" ou "2025-05-21"
4
+ * Saída: "21/05/2025"
5
+ */
6
+ export declare function formataDataRetirandoHora(datastr: string): string;
7
+ /**
8
+ * Formata data vinda do banco (sem hora).
9
+ * Entrada: "2025-05-21"
10
+ * Saída: "21/05/2025"
11
+ */
12
+ export declare function formataDataFromDb(datastr: string): string;
13
+ /**
14
+ * Formata data e hora vinda do banco.
15
+ */
16
+ export declare function formataDataHoraFromDb(datastr: string): string;
17
+ /**
18
+ * Formata dia/mês vindo do banco.
19
+ * Saída: "21/05"
20
+ */
21
+ export declare function formataDiaMesFromDb(datastr: string): string;
22
+ /**
23
+ * Formata data de inteiro para string.
24
+ * Entrada: 7022025 -> "07/02/2025"
25
+ * Entrada: 10032025 -> "10/03/2025"
26
+ */
27
+ export declare function formataDataInt(datastr: number): string;
28
+ /**
29
+ * Alterna formato de data entre DD/MM/YYYY e YYYY-MM-DD.
30
+ */
31
+ export declare function mudaFormatoDataSep(datastr: string): string;
32
+ /**
33
+ * Converte data DD/MM/YYYY para formato ISO YYYY/MM/DD.
34
+ */
35
+ export declare function converterParaDataIso(dataString: string): string;
36
+ /**
37
+ * Alterna formato mês/ano entre MM/YYYY e YYYY-MM.
38
+ */
39
+ export declare function mudaFormatoMesAno(datastr: string): string;
40
+ /**
41
+ * Recebe data "yyyy-mm-dd" e retorna mês de referência "mm/yyyy".
42
+ */
43
+ export declare function formataDataMesReferencia(data: string): string;
44
+ /**
45
+ * Formata data de extrato (inteiro para string).
46
+ * Entrada: 7022025 -> "07/02/2025"
47
+ */
48
+ export declare function formatarDataExtrato(data: number): string;
@@ -0,0 +1,9 @@
1
+ export { formataCpf } from './cpf';
2
+ export { formataCnpj } from './cnpj';
3
+ export { formataNis } from './nis';
4
+ export { formataCep } from './cep';
5
+ export { formataTelefone } from './telefone';
6
+ export { formataMoedaReais } from './moeda';
7
+ export { formataNome, formataNomePessoal } from './nome';
8
+ export { formataDataRetirandoHora, formataDataFromDb, formataDataHoraFromDb, formataDiaMesFromDb, formataDataInt, mudaFormatoDataSep, converterParaDataIso, mudaFormatoMesAno, formataDataMesReferencia, formatarDataExtrato, } from './data';
9
+ export { formataTamanhoArquivo } from './arquivo';
@@ -0,0 +1 @@
1
+ export declare function formataMoedaReais(valor: number): string;
@@ -0,0 +1 @@
1
+ export declare function formataNis(nis: string): string;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Formata nome exibindo apenas primeiro e último nome.
3
+ * Ex: "ALEX FABIANO DE ARAÚJO FURTUNATO" -> "Alex Furtunato"
4
+ */
5
+ export declare function formataNome(nome: string): string;
6
+ /**
7
+ * Formata nome completo respeitando preposições.
8
+ * Ex: "ALEX FABIANO DE ARAÚJO FURTUNATO" -> "Alex Fabiano de Araújo Furtunato"
9
+ */
10
+ export declare function formataNomePessoal(nome: string): string;
@@ -0,0 +1 @@
1
+ export declare function formataTelefone(telefone: string): string;
@@ -0,0 +1,7 @@
1
+ export { getUfs, localePtBr } from './constants/index';
2
+ export type { UF, LocalePtBr } from './constants/index';
3
+ export { formataCpf, formataCnpj, formataNis, formataCep, formataTelefone, formataMoedaReais, formataNome, formataNomePessoal, formataDataRetirandoHora, formataDataFromDb, formataDataHoraFromDb, formataDiaMesFromDb, formataDataInt, mudaFormatoDataSep, converterParaDataIso, mudaFormatoMesAno, formataDataMesReferencia, formatarDataExtrato, formataTamanhoArquivo, } from './format/index';
4
+ export { validarCPF, validarCNPJ, isValidDate, isValidDateMesAno, } from './validate/index';
5
+ export { removeAcentos, removeMascara, removerPontuacao, } from './normalize/index';
6
+ export { maskCpf, maskCnpj, maskCpfCnpj, maskCep, maskTelefone, maskNis, maskMoeda, maskData, maskMesAno, } from './mask/index';
7
+ export type { MaskConfig } from './mask/index';
@@ -0,0 +1,2 @@
1
+ export { maskCpf, maskCnpj, maskCpfCnpj, maskCep, maskTelefone, maskNis, maskMoeda, maskData, maskMesAno, } from './masks';
2
+ export type { MaskConfig } from './masks';
@@ -0,0 +1,13 @@
1
+ export interface MaskConfig {
2
+ mask: string | NumberConstructor;
3
+ [key: string]: unknown;
4
+ }
5
+ export declare const maskCpf: MaskConfig;
6
+ export declare const maskCnpj: MaskConfig;
7
+ export declare const maskCpfCnpj: MaskConfig;
8
+ export declare const maskCep: MaskConfig;
9
+ export declare const maskTelefone: MaskConfig;
10
+ export declare const maskNis: MaskConfig;
11
+ export declare const maskMoeda: MaskConfig;
12
+ export declare const maskData: MaskConfig;
13
+ export declare const maskMesAno: MaskConfig;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Remove máscara de telefone, CPF e CNPJ, deixando apenas dígitos.
3
+ */
4
+ export declare function removeMascara(valor: string): string;
5
+ /**
6
+ * Remove pontuação de documentos inteligentemente:
7
+ * - Se o valor tem mais dígitos que letras (documento), remove pontuação.
8
+ * - Se tem mais letras (nome), mantém como está.
9
+ */
10
+ export declare function removerPontuacao(valor: string): string;
@@ -0,0 +1,2 @@
1
+ export { removeAcentos } from './texto';
2
+ export { removeMascara, removerPontuacao } from './documento';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Remove acentos de um texto.
3
+ * Ex: "São Paulo" -> "Sao Paulo"
4
+ */
5
+ export declare function removeAcentos(texto: string): string;
@@ -0,0 +1 @@
1
+ export declare function validarCNPJ(cnpj: string): boolean;
@@ -0,0 +1 @@
1
+ export declare function validarCPF(cpf: string): boolean;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Valida data no formato DD/MM/YYYY.
3
+ */
4
+ export declare function isValidDate(dateString: string): boolean;
5
+ /**
6
+ * Valida mês/ano no formato MM/YYYY.
7
+ */
8
+ export declare function isValidDateMesAno(dateString: string): boolean;
@@ -0,0 +1,3 @@
1
+ export { validarCPF } from './cpf';
2
+ export { validarCNPJ } from './cnpj';
3
+ export { isValidDate, isValidDateMesAno } from './data';
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@kodatec/brasil-utils",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "author": {
6
+ "name": "Neemias Renan"
7
+ },
8
+ "description": "Utilitários para dados brasileiros: formatação, validação e máscaras de CPF, CNPJ, CEP, telefone, moeda e mais.",
9
+ "main": "./dist/brasil-utils.cjs",
10
+ "module": "./dist/brasil-utils.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/brasil-utils.js",
16
+ "require": "./dist/brasil-utils.cjs"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "scripts": {
23
+ "dev": "vite",
24
+ "build": "tsc -p tsconfig.build.json && vite build",
25
+ "preview": "vite preview",
26
+ "prepublishOnly": "npm run build"
27
+ },
28
+ "keywords": [
29
+ "brasil",
30
+ "brazil",
31
+ "cpf",
32
+ "cnpj",
33
+ "cep",
34
+ "telefone",
35
+ "moeda",
36
+ "brl",
37
+ "validacao",
38
+ "formatacao",
39
+ "mascara",
40
+ "imask",
41
+ "uf",
42
+ "utils"
43
+ ],
44
+ "license": "MIT",
45
+ "devDependencies": {
46
+ "typescript": "~5.9.3",
47
+ "vite": "^7.2.4",
48
+ "vite-plugin-dts": "^4.5.0"
49
+ }
50
+ }