@vivareal/javascript-utils
Advanced tools
Comparing version 1.7.1 to 1.7.2
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.7.2](https://github.com/grupozap/javascript/compare/@vivareal/javascript-utils@1.7.1...@vivareal/javascript-utils@1.7.2) (2020-08-20) | ||
### Bug Fixes | ||
* **validate-cpf:** verification digit logic ([#44](https://github.com/grupozap/javascript/issues/44)) ([3fd6680](https://github.com/grupozap/javascript/commit/3fd6680)) | ||
## [1.6.8](https://github.com/grupozap/javascript/compare/@vivareal/javascript-utils@1.6.7...@vivareal/javascript-utils@1.6.8) (2020-03-09) | ||
@@ -8,0 +19,0 @@ |
@@ -185,3 +185,3 @@ 'use strict'; | ||
.reduce((acc, val, i) => acc + val * (i + 2), 0); | ||
const firstVerificationDigit = (first9DigitsSum * 10) % 11; | ||
const firstVerificationDigit = ((first9DigitsSum * 10) % 11) % 10; | ||
@@ -193,3 +193,3 @@ const first10DigitsSum = cpf | ||
.reduce((acc, val, i) => acc + val * (i + 2), 0); | ||
const secondVerificationDigit = (first10DigitsSum * 10) % 11; | ||
const secondVerificationDigit = ((first10DigitsSum * 10) % 11) % 10; | ||
@@ -196,0 +196,0 @@ return Number(cpf[9]) === firstVerificationDigit && Number(cpf[10]) === secondVerificationDigit; |
@@ -179,3 +179,3 @@ import format from 'date-fns/format'; | ||
.reduce((acc, val, i) => acc + val * (i + 2), 0); | ||
const firstVerificationDigit = (first9DigitsSum * 10) % 11; | ||
const firstVerificationDigit = ((first9DigitsSum * 10) % 11) % 10; | ||
@@ -187,3 +187,3 @@ const first10DigitsSum = cpf | ||
.reduce((acc, val, i) => acc + val * (i + 2), 0); | ||
const secondVerificationDigit = (first10DigitsSum * 10) % 11; | ||
const secondVerificationDigit = ((first10DigitsSum * 10) % 11) % 10; | ||
@@ -190,0 +190,0 @@ return Number(cpf[9]) === firstVerificationDigit && Number(cpf[10]) === secondVerificationDigit; |
{ | ||
"name": "@vivareal/javascript-utils", | ||
"version": "1.7.1", | ||
"version": "1.7.2", | ||
"description": "A set of javascript utilities", | ||
@@ -52,3 +52,3 @@ "author": "Grupo ZAP", | ||
}, | ||
"gitHead": "dea29cb8a3a045d245f33a9bc62731dab7c5c656" | ||
"gitHead": "e29edac15b439499fbad14bdbca1a555a41a848c" | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
14644
1