Skip to content

Releases: VitorLuizC/brazilian-values

Version 0.13.0

10 Jun 03:15
Compare
Choose a tag to compare

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.@@@/@@@@-@@'

    Thanks to @dchueri for PR #61.

All the changes

0.12.0...0.13.0

Version 0.12.0

06 Sep 17:22
Compare
Choose a tag to compare

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

0.11.0-beta.0...0.12.0

Version 0.11.0 (beta)

06 Sep 17:08
Compare
Choose a tag to compare
Version 0.11.0 (beta) Pre-release
Pre-release

Minor Changes

  • Add support to Node.js using type: "module" and/or .mjs files.

    Thanks to @guilhermetelles for helping and testing.

All the changes

0.10.1...0.11.0-beta.0

Version 0.10.1

21 Oct 17:20
Compare
Choose a tag to compare

Patch Changes

  • Fix a bug in NPM that doesn't published dist/ and types/ directories.

    Thanks to @guilhermetelles for pointed me that.

All the changes

0.10.0...0.10.1

Version 0.10.0

20 Oct 20:25
Compare
Choose a tag to compare

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

0.9.1...0.10.0

Version 0.9.1

02 Oct 13:41
Compare
Choose a tag to compare

Patch Changes

  • Add isCPFOrCNPJ docs to both portuguese and english README.md docs.
  • Move Docker section to Contribuindo.
  • Create a new summary with <details>/<summary> elements.

All the changes

0.9.0...0.9.1

Version 0.9.0

02 Oct 13:06
Compare
Choose a tag to compare

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

0.8.0...0.9.0

Version 0.8.0

22 Sep 15:05
Compare
Choose a tag to compare

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 '

    Thanks to @guitexa for issue #38.

  • Removed banner (a comment with library, author and license information) from bundles due to egoist/bili#346.

All the changes

0.7.6...0.8.0

Version 0.7.6

21 Sep 04:15
Compare
Choose a tag to compare

Patch Changes

  • Upgrade devDependencies.

Version 0.7.5

04 Jun 06:07
Compare
Choose a tag to compare

Patch Changes

  • Upgrade devDependencies.