Releases: VitorLuizC/brazilian-values
Version 0.13.0
Minor Changes
-
Add
formatToHiddenDigits
format to hide digits using received range and hider character.formatToHiddenDigits('00.000-000') //=> '**.*00-000' formatToHiddenDigits('03/04/2002', { hider: '-' }) //=> '--/-4/2002' formatToHiddenDigits('111.111.111-11', { range: [4, 9] }) //=> '111.***.***-11' formatToHiddenDigits('12.345.678-9', { hider: '#', range: 5 }) //=> '##.###.678-9' formatToHiddenDigits('52.715.348/0001-69', { hider: '@', range: -9 }) //=> '52.715.@@@/@@@@-@@'
All the changes
Version 0.12.0
Minor Changes
-
Add
isCAEPF
validator that checks if value is a valid CAEPF.isCAEPF('45723174000122') //=> true isCAEPF('457.231.740/001-22') //=> false isCAEPF('45.723.174/0001-22') //=> false isCAEPF('411407182') //=> false isCAEPF('111.111.111/111-11') //=> false
-
Add
formatToCAEPF
formatter that formats a text containing numbers to CAEPF.formatToCAEPF('128781') //=> '128.781' formatToCAEPF('32284981000150') //=> '322.849.810/001-50' formatToCAEPF('00.0.000.00.00--00-00') //=> '000.000.000/000-00'
Thanks to @kramer2005 for PR #54.
-
Add support for
nodenext
module type (for TS consumers).
Patch Changes
-
Fix typo in
getRemaining
helper function name. -
Fix typo in
isCEP
english docs. -
Fix
isCNPJ
TSDocs wrongly saying it formats to CPF.
All the changes
Version 0.11.0 (beta)
Minor Changes
-
Add support to Node.js using
type: "module"
and/or.mjs
files.Thanks to @guilhermetelles for helping and testing.
All the changes
Version 0.10.1
Patch Changes
-
Fix a bug in NPM that doesn't published
dist/
andtypes/
directories.Thanks to @guilhermetelles for pointed me that.
All the changes
Version 0.10.0
Minor Changes
-
Add support to date with time in
parseToDate
parser function.parseToDate('28/03/1996') //=> Date('1996-03-28T03:00:00.000Z') parseToDate('28/03/1996 20:00') //=> Date('1996-03-28T23:00:00.000Z') parseToDate('28/03/1996 20:00:00') //=> Date('1996-03-28T23:00:00.000Z') parseToDate('31/02/2018') //=> throws Error('Value "31/02/2018" is an invalid date.')
Thanks to @mechamobau for PR #41 that fixed issue #23.
Patch Changes
- Upgrade devDependencies.
All the changes
Version 0.9.1
Patch Changes
- Add
isCPFOrCNPJ
docs to both portuguese and englishREADME.md
docs. - Move Docker section to Contribuindo.
- Create a new summary with
<details>
/<summary>
elements.
All the changes
Version 0.9.0
Minor Changes
-
Add
isCPFOrCNPJ
validator that checks if value ir either a valid CPF or a valid CNPJ.isCPFOrCNPJ('366.418.768-70') //=> true isCPFOrCNPJ('45.723.174/0001-10') //=> true isCPFOrCNPJ('411407182') //=> false isCPFOrCNPJ('11.111.111/1111-11') //=> false
Thanks to @roziscoding for PR #39 that fixed issue #27.
All the changes
Version 0.8.0
Minor Changes
-
Add option to disable trim trailing white-spaces on
formatToCapitalized
(it fixes #38).formatToCapitalized(' com espaços no início e no fim ', { trimTrailingWhiteSpaces: false }) //=> ' Com Espaços no Início e no Fim '
-
Removed banner (a comment with library, author and license information) from bundles due to egoist/bili#346.
All the changes
Version 0.7.6
Patch Changes
- Upgrade devDependencies.
Version 0.7.5
Patch Changes
- Upgrade devDependencies.