Comparing version 1.2.2 to 1.2.3
{ | ||
"name": "ibankit", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Validation, field extraction and creation of IBAN, BBAN, BIC numbers", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -33,7 +33,17 @@ import { CharacterType, BbanStructurePart, PartType } from "./structurePart"; | ||
.join(""); | ||
const d1 = mod11(`00${combined}`, weights); | ||
const d2 = mod11( | ||
function to11(v: number) { | ||
if (v === 10) { | ||
return 1; | ||
} else if (v === 11) { | ||
return 0; | ||
} | ||
return v; | ||
} | ||
const d1 = to11(mod11(`00${combined}`, weights)); | ||
const d2 = to11(mod11( | ||
structure.extractValueMust(bban, PartType.ACCOUNT_NUMBER), | ||
weights, | ||
); | ||
)); | ||
@@ -40,0 +50,0 @@ return `${d1}${d2}`; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
303562
5221