ibantools 4.1.4 → 4.1.5

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.
@@ -8,7 +8,7 @@
8
8
  * @package Documentation
9
9
  * @author Saša Jovanić
10
10
  * @module ibantools
11
- * @version 4.1.4
11
+ * @version 4.1.5
12
12
  * @license MPL-2.0
13
13
  * @preferred
14
14
  */
@@ -27,21 +27,16 @@ exports.countrySpecs = exports.extractBIC = exports.validateBIC = exports.Valida
27
27
  * ```
28
28
  */
29
29
  function isValidIBAN(iban) {
30
- if (iban !== undefined && iban !== null) {
31
- var reg = new RegExp('^[0-9]{2}$', '');
32
- var spec = exports.countrySpecs[iban.slice(0, 2)];
33
- if (spec !== undefined &&
34
- spec.bban_regexp &&
35
- spec.bban_regexp !== null &&
36
- spec.chars &&
37
- spec.chars === iban.length &&
38
- reg.test(iban.slice(2, 4)) &&
39
- isValidBBAN(iban.slice(4), iban.slice(0, 2)) &&
40
- isValidIBANChecksum(iban)) {
41
- return true;
42
- }
43
- }
44
- return false;
30
+ if (iban === undefined || iban === null)
31
+ return false;
32
+ var reg = new RegExp('^[0-9]{2}$', '');
33
+ var spec = exports.countrySpecs[iban.slice(0, 2)];
34
+ if (spec === undefined || spec.bban_regexp === undefined || spec.bban_regexp === null || spec.chars === undefined)
35
+ return false;
36
+ return (spec.chars === iban.length &&
37
+ reg.test(iban.slice(2, 4)) &&
38
+ isValidBBAN(iban.slice(4), iban.slice(0, 2)) &&
39
+ isValidIBANChecksum(iban));
45
40
  }
46
41
  exports.isValidIBAN = isValidIBAN;
47
42
  /**
@@ -115,21 +110,21 @@ exports.validateIBAN = validateIBAN;
115
110
  * ```
116
111
  */
117
112
  function isValidBBAN(bban, countryCode) {
118
- if (bban !== undefined && bban !== null && countryCode !== undefined && countryCode !== null) {
119
- var spec = exports.countrySpecs[countryCode];
120
- if (spec !== undefined &&
121
- spec !== null &&
122
- spec.bban_regexp &&
123
- spec.bban_regexp !== null &&
124
- spec.chars &&
125
- spec.chars !== null &&
126
- spec.chars - 4 === bban.length &&
127
- checkFormatBBAN(bban, spec.bban_regexp)) {
128
- if (spec.bban_validation_func) {
129
- return spec.bban_validation_func(bban.replace(/[\s.]+/g, ''));
130
- }
131
- return true;
113
+ if (bban === undefined || bban === null || countryCode === undefined || countryCode === null)
114
+ return false;
115
+ var spec = exports.countrySpecs[countryCode];
116
+ if (spec === undefined ||
117
+ spec === null ||
118
+ spec.bban_regexp === undefined ||
119
+ spec.bban_regexp === null ||
120
+ spec.chars === undefined ||
121
+ spec.chars === null)
122
+ return false;
123
+ if (spec.chars - 4 === bban.length && checkFormatBBAN(bban, spec.bban_regexp)) {
124
+ if (spec.bban_validation_func) {
125
+ return spec.bban_validation_func(bban.replace(/[\s.]+/g, ''));
132
126
  }
127
+ return true;
133
128
  }
134
129
  return false;
135
130
  }
@@ -192,10 +187,11 @@ exports.composeIBAN = composeIBAN;
192
187
  */
193
188
  function extractIBAN(iban) {
194
189
  var result = {};
195
- result.iban = iban;
196
- if (isValidIBAN(iban)) {
197
- result.bban = iban.slice(4);
198
- result.countryCode = iban.slice(0, 2);
190
+ var eFormatIBAN = electronicFormatIBAN(iban);
191
+ result.iban = eFormatIBAN || iban;
192
+ if (!!eFormatIBAN && isValidIBAN(eFormatIBAN)) {
193
+ result.bban = eFormatIBAN.slice(4);
194
+ result.countryCode = eFormatIBAN.slice(0, 2);
199
195
  result.valid = true;
200
196
  }
201
197
  else {
@@ -263,43 +259,54 @@ exports.friendlyFormatIBAN = friendlyFormatIBAN;
263
259
  * @ignore
264
260
  */
265
261
  function isValidIBANChecksum(iban) {
262
+ var countryCode = iban.slice(0, 2);
266
263
  var providedChecksum = parseInt(iban.slice(2, 4), 10);
267
- var temp = iban.slice(3) + iban.slice(0, 2) + '00';
268
- var validationString = '';
269
- for (var n = 1; n < temp.length; n++) {
270
- var c = temp.charCodeAt(n);
271
- if (c >= 65) {
272
- validationString += (c - 55).toString();
273
- }
274
- else {
275
- validationString += temp[n];
276
- }
277
- }
278
- while (validationString.length > 2) {
279
- var part = validationString.slice(0, 6);
280
- validationString = (parseInt(part, 10) % 97).toString() + validationString.slice(part.length);
281
- }
282
- var rest = parseInt(validationString, 10) % 97;
264
+ var bban = iban.slice(4);
265
+ // Wikipedia[validating_iban] says there are a specif way to check if a IBAN is valid but
266
+ // it. It says 'If the remainder is 1, the check digit test is passed and the
267
+ // IBAN might be valid.'. might, MIGHT!
268
+ // We don't want might but want yes or no. Since every BBAN is IBAN from the fifth
269
+ // (slice(4)) we can generate the IBAN from BBAN and country code(two first characters)
270
+ // from in the IBAN.
271
+ // To generate the (generate the iban check digits)[generating-iban-check]
272
+ // Move the country code to the end
273
+ // remove the checksum from the begging
274
+ // Add "00" to the end
275
+ // modulo 97 on the amount
276
+ // subtract remainder from 98, (98 - remainder)
277
+ // Add a leading 0 if the remainder is less then 10 (padStart(2, "0")) (we skip this
278
+ // since we compare int, not string)
279
+ //
280
+ // [validating_iban][https://en.wikipedia.org/wiki/International_Bank_Account_Number#Validating_the_IBAN]
281
+ // [generating-iban-check][https://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits]
282
+ var validationString = replaceCharaterWithCode("".concat(bban).concat(countryCode, "00"));
283
+ var rest = mod9710(validationString);
283
284
  return 98 - rest === providedChecksum;
284
285
  }
286
+ /**
287
+ * Iban contain characters and should be converted to intereger by 55 substracted
288
+ * from there ascii value
289
+ *
290
+ * @ignore
291
+ */
292
+ function replaceCharaterWithCode(str) {
293
+ // It is slower but alot more readable
294
+ // https://jsbench.me/ttkzgsekae/1
295
+ return str
296
+ .split('')
297
+ .map(function (c) {
298
+ var code = c.charCodeAt(0);
299
+ return code >= 65 ? (code - 55).toString() : c;
300
+ })
301
+ .join('');
302
+ }
285
303
  /**
286
304
  * MOD-97-10
287
305
  *
288
306
  * @ignore
289
307
  */
290
308
  function mod9710Iban(iban) {
291
- iban = iban.slice(3) + iban.slice(0, 4);
292
- var validationString = '';
293
- for (var n = 1; n < iban.length; n++) {
294
- var c = iban.charCodeAt(n);
295
- if (c >= 65) {
296
- validationString += (c - 55).toString();
297
- }
298
- else {
299
- validationString += iban[n];
300
- }
301
- }
302
- return mod9710(validationString);
309
+ return mod9710(replaceCharaterWithCode(iban.slice(3) + iban.slice(0, 4)));
303
310
  }
304
311
  /**
305
312
  * Returns specifications for all countries, even those who are not
@@ -328,10 +335,10 @@ function getCountrySpecifications() {
328
335
  for (var countyCode in exports.countrySpecs) {
329
336
  var county = exports.countrySpecs[countyCode];
330
337
  countyMap[countyCode] = {
331
- chars: county.chars ? county.chars : null,
332
- bban_regexp: county.bban_regexp ? county.bban_regexp : null,
333
- IBANRegistry: county.IBANRegistry ? county.IBANRegistry : false,
334
- SEPA: county.SEPA ? county.SEPA : false,
338
+ chars: county.chars || null,
339
+ bban_regexp: county.bban_regexp || null,
340
+ IBANRegistry: county.IBANRegistry || false,
341
+ SEPA: county.SEPA || false,
335
342
  };
336
343
  }
337
344
  return countyMap;
@@ -462,12 +469,17 @@ var checkBelgianBBAN = function (bban) {
462
469
  */
463
470
  var mod9710 = function (validationString) {
464
471
  while (validationString.length > 2) {
472
+ // > Any computer programming language or software package that is used to compute D
473
+ // > mod 97 directly must have the ability to handle integers of more than 30 digits.
474
+ // > In practice, this can only be done by software that either supports
475
+ // > arbitrary-precision arithmetic or that can handle 219-bit (unsigned) integers
476
+ // https://en.wikipedia.org/wiki/International_Bank_Account_Number#Modulo_operation_on_IBAN
465
477
  var part = validationString.slice(0, 6);
466
- var value = parseInt(part, 10) % 97;
467
- if (isNaN(value)) {
478
+ var partInt = parseInt(part, 10);
479
+ if (isNaN(partInt)) {
468
480
  return NaN;
469
481
  }
470
- validationString = value.toString() + validationString.slice(part.length);
482
+ validationString = (partInt % 97) + validationString.slice(part.length);
471
483
  }
472
484
  return parseInt(validationString, 10) % 97;
473
485
  };
@@ -1214,7 +1226,13 @@ exports.countrySpecs = {
1214
1226
  IBANRegistry: true,
1215
1227
  SEPA: true,
1216
1228
  },
1217
- NO: { chars: 15, bban_regexp: '^[0-9]{11}$', bban_validation_func: checkNorwayBBAN, IBANRegistry: true, SEPA: true },
1229
+ NO: {
1230
+ chars: 15,
1231
+ bban_regexp: '^[0-9]{11}$',
1232
+ bban_validation_func: checkNorwayBBAN,
1233
+ IBANRegistry: true,
1234
+ SEPA: true,
1235
+ },
1218
1236
  NP: {},
1219
1237
  NR: {},
1220
1238
  NU: {},
@@ -8,7 +8,7 @@
8
8
  * @package Documentation
9
9
  * @author Saša Jovanić
10
10
  * @module ibantools
11
- * @version 4.1.4
11
+ * @version 4.1.5
12
12
  * @license MPL-2.0
13
13
  * @preferred
14
14
  */
@@ -25,21 +25,16 @@
25
25
  * ```
26
26
  */
27
27
  export function isValidIBAN(iban) {
28
- if (iban !== undefined && iban !== null) {
29
- var reg = new RegExp('^[0-9]{2}$', '');
30
- var spec = countrySpecs[iban.slice(0, 2)];
31
- if (spec !== undefined &&
32
- spec.bban_regexp &&
33
- spec.bban_regexp !== null &&
34
- spec.chars &&
35
- spec.chars === iban.length &&
36
- reg.test(iban.slice(2, 4)) &&
37
- isValidBBAN(iban.slice(4), iban.slice(0, 2)) &&
38
- isValidIBANChecksum(iban)) {
39
- return true;
40
- }
41
- }
42
- return false;
28
+ if (iban === undefined || iban === null)
29
+ return false;
30
+ var reg = new RegExp('^[0-9]{2}$', '');
31
+ var spec = countrySpecs[iban.slice(0, 2)];
32
+ if (spec === undefined || spec.bban_regexp === undefined || spec.bban_regexp === null || spec.chars === undefined)
33
+ return false;
34
+ return (spec.chars === iban.length &&
35
+ reg.test(iban.slice(2, 4)) &&
36
+ isValidBBAN(iban.slice(4), iban.slice(0, 2)) &&
37
+ isValidIBANChecksum(iban));
43
38
  }
44
39
  /**
45
40
  * IBAM validation errors
@@ -111,21 +106,21 @@ export function validateIBAN(iban) {
111
106
  * ```
112
107
  */
113
108
  export function isValidBBAN(bban, countryCode) {
114
- if (bban !== undefined && bban !== null && countryCode !== undefined && countryCode !== null) {
115
- var spec = countrySpecs[countryCode];
116
- if (spec !== undefined &&
117
- spec !== null &&
118
- spec.bban_regexp &&
119
- spec.bban_regexp !== null &&
120
- spec.chars &&
121
- spec.chars !== null &&
122
- spec.chars - 4 === bban.length &&
123
- checkFormatBBAN(bban, spec.bban_regexp)) {
124
- if (spec.bban_validation_func) {
125
- return spec.bban_validation_func(bban.replace(/[\s.]+/g, ''));
126
- }
127
- return true;
109
+ if (bban === undefined || bban === null || countryCode === undefined || countryCode === null)
110
+ return false;
111
+ var spec = countrySpecs[countryCode];
112
+ if (spec === undefined ||
113
+ spec === null ||
114
+ spec.bban_regexp === undefined ||
115
+ spec.bban_regexp === null ||
116
+ spec.chars === undefined ||
117
+ spec.chars === null)
118
+ return false;
119
+ if (spec.chars - 4 === bban.length && checkFormatBBAN(bban, spec.bban_regexp)) {
120
+ if (spec.bban_validation_func) {
121
+ return spec.bban_validation_func(bban.replace(/[\s.]+/g, ''));
128
122
  }
123
+ return true;
129
124
  }
130
125
  return false;
131
126
  }
@@ -185,10 +180,11 @@ export function composeIBAN(params) {
185
180
  */
186
181
  export function extractIBAN(iban) {
187
182
  var result = {};
188
- result.iban = iban;
189
- if (isValidIBAN(iban)) {
190
- result.bban = iban.slice(4);
191
- result.countryCode = iban.slice(0, 2);
183
+ var eFormatIBAN = electronicFormatIBAN(iban);
184
+ result.iban = eFormatIBAN || iban;
185
+ if (!!eFormatIBAN && isValidIBAN(eFormatIBAN)) {
186
+ result.bban = eFormatIBAN.slice(4);
187
+ result.countryCode = eFormatIBAN.slice(0, 2);
192
188
  result.valid = true;
193
189
  }
194
190
  else {
@@ -253,43 +249,54 @@ export function friendlyFormatIBAN(iban, separator) {
253
249
  * @ignore
254
250
  */
255
251
  function isValidIBANChecksum(iban) {
252
+ var countryCode = iban.slice(0, 2);
256
253
  var providedChecksum = parseInt(iban.slice(2, 4), 10);
257
- var temp = iban.slice(3) + iban.slice(0, 2) + '00';
258
- var validationString = '';
259
- for (var n = 1; n < temp.length; n++) {
260
- var c = temp.charCodeAt(n);
261
- if (c >= 65) {
262
- validationString += (c - 55).toString();
263
- }
264
- else {
265
- validationString += temp[n];
266
- }
267
- }
268
- while (validationString.length > 2) {
269
- var part = validationString.slice(0, 6);
270
- validationString = (parseInt(part, 10) % 97).toString() + validationString.slice(part.length);
271
- }
272
- var rest = parseInt(validationString, 10) % 97;
254
+ var bban = iban.slice(4);
255
+ // Wikipedia[validating_iban] says there are a specif way to check if a IBAN is valid but
256
+ // it. It says 'If the remainder is 1, the check digit test is passed and the
257
+ // IBAN might be valid.'. might, MIGHT!
258
+ // We don't want might but want yes or no. Since every BBAN is IBAN from the fifth
259
+ // (slice(4)) we can generate the IBAN from BBAN and country code(two first characters)
260
+ // from in the IBAN.
261
+ // To generate the (generate the iban check digits)[generating-iban-check]
262
+ // Move the country code to the end
263
+ // remove the checksum from the begging
264
+ // Add "00" to the end
265
+ // modulo 97 on the amount
266
+ // subtract remainder from 98, (98 - remainder)
267
+ // Add a leading 0 if the remainder is less then 10 (padStart(2, "0")) (we skip this
268
+ // since we compare int, not string)
269
+ //
270
+ // [validating_iban][https://en.wikipedia.org/wiki/International_Bank_Account_Number#Validating_the_IBAN]
271
+ // [generating-iban-check][https://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits]
272
+ var validationString = replaceCharaterWithCode("".concat(bban).concat(countryCode, "00"));
273
+ var rest = mod9710(validationString);
273
274
  return 98 - rest === providedChecksum;
274
275
  }
276
+ /**
277
+ * Iban contain characters and should be converted to intereger by 55 substracted
278
+ * from there ascii value
279
+ *
280
+ * @ignore
281
+ */
282
+ function replaceCharaterWithCode(str) {
283
+ // It is slower but alot more readable
284
+ // https://jsbench.me/ttkzgsekae/1
285
+ return str
286
+ .split('')
287
+ .map(function (c) {
288
+ var code = c.charCodeAt(0);
289
+ return code >= 65 ? (code - 55).toString() : c;
290
+ })
291
+ .join('');
292
+ }
275
293
  /**
276
294
  * MOD-97-10
277
295
  *
278
296
  * @ignore
279
297
  */
280
298
  function mod9710Iban(iban) {
281
- iban = iban.slice(3) + iban.slice(0, 4);
282
- var validationString = '';
283
- for (var n = 1; n < iban.length; n++) {
284
- var c = iban.charCodeAt(n);
285
- if (c >= 65) {
286
- validationString += (c - 55).toString();
287
- }
288
- else {
289
- validationString += iban[n];
290
- }
291
- }
292
- return mod9710(validationString);
299
+ return mod9710(replaceCharaterWithCode(iban.slice(3) + iban.slice(0, 4)));
293
300
  }
294
301
  /**
295
302
  * Returns specifications for all countries, even those who are not
@@ -318,10 +325,10 @@ export function getCountrySpecifications() {
318
325
  for (var countyCode in countrySpecs) {
319
326
  var county = countrySpecs[countyCode];
320
327
  countyMap[countyCode] = {
321
- chars: county.chars ? county.chars : null,
322
- bban_regexp: county.bban_regexp ? county.bban_regexp : null,
323
- IBANRegistry: county.IBANRegistry ? county.IBANRegistry : false,
324
- SEPA: county.SEPA ? county.SEPA : false,
328
+ chars: county.chars || null,
329
+ bban_regexp: county.bban_regexp || null,
330
+ IBANRegistry: county.IBANRegistry || false,
331
+ SEPA: county.SEPA || false,
325
332
  };
326
333
  }
327
334
  return countyMap;
@@ -448,12 +455,17 @@ var checkBelgianBBAN = function (bban) {
448
455
  */
449
456
  var mod9710 = function (validationString) {
450
457
  while (validationString.length > 2) {
458
+ // > Any computer programming language or software package that is used to compute D
459
+ // > mod 97 directly must have the ability to handle integers of more than 30 digits.
460
+ // > In practice, this can only be done by software that either supports
461
+ // > arbitrary-precision arithmetic or that can handle 219-bit (unsigned) integers
462
+ // https://en.wikipedia.org/wiki/International_Bank_Account_Number#Modulo_operation_on_IBAN
451
463
  var part = validationString.slice(0, 6);
452
- var value = parseInt(part, 10) % 97;
453
- if (isNaN(value)) {
464
+ var partInt = parseInt(part, 10);
465
+ if (isNaN(partInt)) {
454
466
  return NaN;
455
467
  }
456
- validationString = value.toString() + validationString.slice(part.length);
468
+ validationString = (partInt % 97) + validationString.slice(part.length);
457
469
  }
458
470
  return parseInt(validationString, 10) % 97;
459
471
  };
@@ -1200,7 +1212,13 @@ export var countrySpecs = {
1200
1212
  IBANRegistry: true,
1201
1213
  SEPA: true,
1202
1214
  },
1203
- NO: { chars: 15, bban_regexp: '^[0-9]{11}$', bban_validation_func: checkNorwayBBAN, IBANRegistry: true, SEPA: true },
1215
+ NO: {
1216
+ chars: 15,
1217
+ bban_regexp: '^[0-9]{11}$',
1218
+ bban_validation_func: checkNorwayBBAN,
1219
+ IBANRegistry: true,
1220
+ SEPA: true,
1221
+ },
1204
1222
  NP: {},
1205
1223
  NR: {},
1206
1224
  NU: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ibantools",
3
- "version": "4.1.4",
3
+ "version": "4.1.5",
4
4
  "description": "Validation, extraction and creation of IBAN, BBAN, BIC/SWIFT numbers plus some other helpful stuff like ISO 3136-1 alpha 2 country list",
5
5
  "keywords": [
6
6
  "IBAN",
@@ -53,14 +53,12 @@
53
53
  "@typescript-eslint/eslint-plugin": "^4.28.4",
54
54
  "@typescript-eslint/parser": "^4.28.4",
55
55
  "chai": "^4.3.4",
56
- "cheerio": "^0.22",
57
56
  "coveralls": "^3.1.1",
58
57
  "docdash": "^1.2.0",
59
58
  "eslint": "^7.31.0",
60
59
  "eslint-config-prettier": "^8.3.0",
61
60
  "eslint-plugin-prettier": "^4.0.0",
62
61
  "gulp": "^4.0.2",
63
- "gulp-mocha": "^8.0",
64
62
  "gulp-rename": "^2.0",
65
63
  "gulp-shell": "^0.8.0",
66
64
  "gulp-typescript": "^5.0",
package/ChangeLog DELETED
@@ -1,275 +0,0 @@
1
- 2022-02-03 Saša Jovanić <sasa@simplify.ba>
2
- * Version 4.1.4
3
- * Fix issue #103 - Remove Dutch BBAN validation
4
- * Various development dependencies upgrades
5
-
6
- 2021-12-17 Saša Jovanić <sasa@simplify.ba>
7
- * Version 4.1.3
8
- * Fix issue #85 - Fix NaN issue when calling `validateIBAN`
9
-
10
- 2021-12-14 Saša Jovanić <sasa@simplify.ba>
11
- * Version 4.1.2
12
- * Fix issue #83 - Fix problem when country can not be found when calling `validateIBAN`
13
-
14
- 2021-12-05 Saša Jovanić <sasa@simplify.ba>
15
- * Version 4.1.1
16
- * Added Hungarian (HU) BBAN validation
17
-
18
- 2021-12-01 Saša Jovanić <sasa@simplify.ba>
19
- * Improve test coverage
20
-
21
- 2021-11-30 Saša Jovanić <sasa@simplify.ba>
22
- * Added Estonian (EE) BBAN validation
23
- * Added Finland (FI) BBAN validation
24
- * Aland Islands (AX) uses BBAN valkidation from Finland
25
- * Added French (FR) and Monaco (MC) BBAN validation
26
-
27
- 2021-11-28 Saša Jovanić <sasa@simplify.ba>
28
- * Added Czech (CZ) BBAN validation
29
-
30
- 2021-11-27 Saša Jovanić <sasa@simplify.ba>
31
- * Added Croatian (HR) BBAN validation
32
-
33
- 2021-11-25 Saša Jovanić <sasa@simplify.ba>
34
- * Version 4.1.0
35
- * Added Belgian (BE) extra BBAN validation
36
- * Added mod97/10 BBAN validation for countries that do it that way: BA, ME, MK, PT, RS and SI
37
-
38
- 2021-11-24 Saša Jovanić <sasa@simplify.ba>
39
- * Added Netherlands (NL) extra BBAN validation
40
- * Added extra error code when validating IBAN `WrongAccountBankBranchChecksum` that indicates when checksum for account number or bank or branch code is incorrect
41
-
42
- 2021-11-23 Saša Jovanić <sasa@simplify.ba>
43
- * Version 4.0.1
44
- * Fixed bug when validating Spain IBAN
45
-
46
- 2021-11-18 Saša Jovanić <sasa@simplify.ba>
47
- * Updated README with new and updated badges
48
- * Fixed documentation on GH pages
49
- * Added dependabot dependency updates and merged some created dependency pull requests
50
- * Added Node 17 to build version on GitHub actions
51
- * Added GitHub CodeQL workflow
52
-
53
- 2021-11-17 Saša Jovanić <sasa@simplify.ba>
54
- * Version 4.0.0
55
- * Fixed Senegal (SN) regular expression
56
- * Updated Burundi (BI) specification
57
- * Added Spain (ES) extra BBAN validation
58
- * Added Poland (PL) extra BBAN validation
59
- * Added test to check for extra BBAN validation function
60
-
61
- 2021-09-30 Simen Mailund Svendsen <simen.m.s@hotmail.com>
62
- * Fix invalid norwegian BBANS (failing MOD11 check) being incorrectly returned as valid
63
-
64
- 2021-07-24 Saša Jovanić <sasa@simplify.ba>
65
- * Version 3.3.1
66
- * Fixed issue not showing AD and BG as SEPA countries
67
- * Fixed issue when incorrectly showing GL and FO as SEPA countryes
68
- * Fixed incorrect documentation for `composeIBAN`
69
- * Updates list of supported Node.js versions
70
- * Update dev dependencies
71
-
72
- 2021-05-05 Daniel Friesen <d@danf.ca>
73
- * Fixed `validateIBAN`'s handling of unsupported countries like US
74
- * Added checksum validation for unsupported/unknown countries to `validateIBAN`
75
-
76
- 2021-04-03 Saša Jovanić <sasa@simplify.ba>
77
- * Coverage improved to 100%
78
-
79
- 2021-04-03 Saša Jovanić <sasa@simplify.ba>
80
- * Version 3.3.0
81
- * Error codes for IBAN and BIC validation. Added `validateIBAN` and `validateBIC` methods that will return error codes.
82
-
83
- 2021-04-03 Saša Jovanić <sasa@simplify.ba>
84
- * Version 3.2.5
85
- * (Dependabot) Bump y18n from 3.2.1 to 3.2.2
86
-
87
- 2021-03-29 Xavier Alvarez
88
- * Fix validation for Burkina Faso, Benin, Algeria and Mali
89
-
90
- 2021-03-10 Saša Jovanić <sasa@simplify.ba>
91
- * Version 3.2.4
92
- * Exported `countrySpecs` to restore a bit of compatibility broken in 3.2.3
93
- * Updated development dependencies
94
- * Documentation is now part of master branch
95
-
96
- 2021-02-07 Saša Jovanić <sasa@simplify.ba>
97
- * Version 3.2.3
98
- * Dependabot PR merged
99
-
100
- 2021-02-06 Richard Leurs
101
- * Improve bundle size
102
-
103
- 2020-11-10 Saša Jovanić <sasa@simplify.ba>
104
- * Version 3.2.2
105
- * Fixed support for Cape Verde
106
- * Dependabot PR merged
107
-
108
- 2020-11-10 Saša Jovanić <sasa@simplify.ba>
109
- * Switch from `jsdoc` to `typedoc` for documentation generation
110
- * Typo in interface name fixed, this will require mayor version release
111
-
112
- 2020-11-09 Saša Jovanić <sasa@simplify.ba>
113
- * Removed `tslint` and added `eslint` and `prettier` to be used with `gulp lint` task
114
- * Added GitHub Action for linting to workflow
115
- * Updated PR template on GitHub and modified `CONTRIBUTING.md` document
116
-
117
- 2020-11-04 Saša Jovanić <sasa@simplify.ba>
118
- * Version 3.2.1
119
- * Merged PR from @witoldsz: Fixed Azerbaijan IBAN check regexp
120
-
121
- 2020-11-04 Saša Jovanić <sasa@simplify.ba>
122
- * Removed Travis CI integration and integrated Github Action to show badge on master branch and status on pull requests
123
- * Upgraded to `typescript` 4
124
-
125
- 2020-11-03 Saša Jovanić <sasa@simplify.ba>
126
- * Version 3.2.0
127
- * Added Node 15 and removed node 13 to Travis environments
128
- * Updated various development dependencies
129
- * Test file is no longer written in TypeScript - types/chai is a problem when building for ES5
130
- * Switched from `istanbul` to `nyc` for code coverage
131
- * Added Libya as new addition to official IBAN registry
132
- * Fix crash when `isValidBIC` receives `null` or `undefined`
133
- * Added Github Build Action as preparation to move away from Travis CI
134
-
135
- 2020-06-21 Saša Jovanić <sasa@simplify.ba>
136
- * Version 3.1.0
137
- * Merged PR from @EarthlingRich (Richard Leurs) that adds `isSEPACountry` function.
138
- * Fixed RegExp for Seychelles
139
- * Added Node 14 to Travis environments
140
-
141
- 2020-04-05 Saša Jovanić <sasa@simplify.ba>
142
- * Version 3.0.0
143
-
144
- 2020-03-31 Saša Jovanić <sasa@simplify.ba>
145
- * Updated some dev dependencies
146
-
147
- 2020-03-29 Saša Jovanić <sasa@simplify.ba>
148
- * Merged #18 - Drop country names from output - PR from @eemeli (Eemeli Aro) that removes country names from functions output. Country code is still present. This will reduce total bundle size. If you still need country names, please use `countrynames` or `country-iso` packages.
149
- * Merged various dependabot pull requests.
150
- * Added prettier as dev dependency.
151
- * Upgraded dependencies based on `npm audit`.
152
- * Added node 13 and dropped node 11 on Travis.
153
- * Added Egypt as new addition to official IBAN specification.
154
- * Added countries that are not in official IBAN specification published by Swift: Algeria, Angola, Benin, Burkina Faso, Burundi, Cameroon, Cape Verde, Iran, Ivory Coast, Madagascar, Mali, Mozambique, Senegal, Comoros, Chad, Gabon, Honduras, Morocco, Nicaragua, Niger, Togo, Central African Republic, Djibouti, Equatorial Guinea and Guinea-Bissau.
155
-
156
- 2019-08-12 Saša Jovanić <sasa@simplify.ba>
157
- * Released varsion 2.2.0
158
- * Fixed Swift register PDF link on README file
159
- * Fixed problem with invalid IBAN checksum structure (GH16)
160
- * When checking if IBAN checksum is valid we will generate IBAN checksum and compare it with existing one instead of checking if result of mod97-10 is 1
161
- * Added `strict` flag to tsconfig
162
-
163
- 2019-05-05 Saša Jovanić <sasa@simplify.ba>
164
- * Updated development dependencies to latest versions
165
- * Updated deep dependencies that have security issues
166
-
167
- 2019-05-05 Saša Jovanić <sasa@simplify.ba>
168
- * Released varsion 2.1.0
169
- * Merged PR1 - Renamed `main:jsnext` to `modules` - Thanks @NeoLegends (PR1/GH9)
170
- * Upraded various packages containing security vulnerabilities using `npm audit fix`
171
- * Upgraded Gulp to version 4 and all gulp tasks
172
- * Added Vatican City State (GH13)
173
- * `friendlyFormatIBAN` and `electronicFormatIBAN` will return `null` when non-string value is provided (GH15).
174
- * Fixed issue with `extractBIC` when argument is provided in lowercase (GH12).
175
-
176
- 2018-03-11 Saša Jovanić <sasa@simplify.ba>
177
- * Released version 2.0.0
178
- * BREAKING: `isValidIBAN` does not accept IBAN with `-` and ` ` any more - IBAN must be already in electronic format
179
- * `getCountrySpecifications` now returns all countries (ISO-3166-1 alpha-2 + `XK` - temporary country code for Kosovo) with `IBANRegistry` boolean property that indicates if country is in IBAN registry or not
180
- * `extractIBAN` now requires IBAN in electronic format
181
- * `isValidBIC` now also checks if Country exists
182
- * `extractBIC` also returns property `countryCode`
183
- * Added `tslint` as development dependency
184
-
185
- 2018-02-13 Saša Jovanić <sasa@simplify.ba>
186
- * Released version 1.6.0
187
- * Fixed link to latest IBAN registry PDF document
188
- * Fixed validation for Costa Rica (it has 18 digits now, not 17)
189
- * Added Republic of Belarus
190
- * Added Iraq
191
- * Renamed `Palestinian teritories` to `State of Palestine`, as in IBAN registry
192
- * Added El Salvador
193
- * Updated develpoment dependencies
194
- * `ExtractIBANResult` now also contains `iban` that represents IBAN electronic format
195
- * `electronicFormatIBAN` now removes only spaces and dashes, not the other unicode characters
196
-
197
- 2017-11-15 Saša Jovanić <sasa@simplify.ba>
198
- * Released version 1.5.1
199
- * Fixed mistake in BIC validation regexp when brach code is present (GH-5)
200
- * Added node.js 9 to TravisCI
201
-
202
- 2017-10-10 Saša Jovanić <sasa@simplify.ba>
203
- * Released version 1.5.0
204
- * Fixed typos in source code and documentation (GH-4)
205
-
206
- 2017-10-05 Saša Jovanić <sasa@simplify.ba>
207
- * Changed documentation theme to `docdash`
208
- * Fixed links in README to avoid broken links in documentation
209
- * Updated `coverals` package
210
-
211
- 2017-10-05 Saša Jovanić <sasa@simplify.ba>
212
- * Released version 1.4.0
213
- * Added code of conduct
214
- * Updated mocha development dependency to 4.0
215
- * Added contribution guide
216
- * Updated JSDoc to latest version
217
- * Added issue and pull request template
218
-
219
- 2017-08-23 Saša Jovanić <sasa@simplify.ba>
220
- * Now using @types - typings removed
221
-
222
- 2017-08-22 Saša Jovanić <sasa@simplify.ba>
223
- * Updated development dependencies
224
- * Added node version 8 to TravisCI tests
225
-
226
- 2017-03-09 Saša Jovanić <sasa@simplify.ba>
227
- * Released version 1.3.0
228
- * Fixed `jsnext:main` file output
229
- * Fixed problem with BIC/SWIFT validation when branch code is part of BIC/SWIFT
230
- * extractBIC will return `branchCode` as '619' (primary office) if branch code in not part of BIC/SWIFT number
231
- * Fixed README file
232
- * Updated development dependencies
233
-
234
- 2017-02-04 Saša Jovanić <sasa@simplify.ba>
235
- * Released version 1.2.0
236
- * Added BIC/SWIFT validation
237
- * Added BIC/SWIFT extraction
238
- * Updated TypeScript definitions
239
-
240
- 2017-01-29 Saša Jovanić <sasa@simplify.ba>
241
- * Removed testing on Node 4 and 5 in TravisCI and added testing on 7
242
- * Updated dev dependencies
243
- * Removed TSLint deprecations
244
- * Fixed ducumentation
245
-
246
- 2016-08-30 Saša Jovanić <sasa@simplify.ba>
247
- * Removed CodeCov codes
248
- * Added Coveralls badge and integration
249
- * Added Dependency CI badge
250
-
251
- 2016-08-27 Saša Jovanić <sasa@simplify.ba>
252
- * Released version 1.1.0
253
- * Added Sao Tome And Principe (ST)
254
- * Added Saint Lucia (LC)
255
- * Added Aland Islands (AX)
256
- * Added French Guyana (GF)
257
- * Added Guadeloupe (GP)
258
- * Added Martinique (MQ)
259
- * Added Reunion (RE)
260
- * Added French Polynesia (PF)
261
- * Added French Southern Territories (TF)
262
- * Added Mayotte (YT)
263
- * Added New Caledonia (NC)
264
- * Added Saint Barthelemy (BL)
265
- * Added Saint Martin (MF)
266
- * Added Saint Pierre et Miquelon (PM)
267
- * Added Wallis and Futuna Islands (WF)
268
- * Added Seychelles (SC)
269
- * Fixed Republic of Azerbaijan and Jordan regexps
270
- * Fixed some of the country names
271
- * Added Node 6 to Travis CI
272
- * Added Codecov to Travis CI config file
273
- * Added this ChangeLog
274
- * Updated development dependencies and typings
275
- * Removed old script that used to retrive IBAN countries and codes from Wikipedia