Skip to content

Commit fd4250e

Browse files
authored
Release/2.5.0 (#112)
* bumped version * update deps * checkstyle * build
1 parent 2fb72b3 commit fd4250e

File tree

186 files changed

+2539
-2532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+2539
-2532
lines changed

lib/amd/index.js

+37-36
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports", "./lib/countries", "./lib/countries", "./lib/jsvat"], function (require, exports, countries_1, countries_2, jsvat_1) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.checkVAT = exports.unitedKingdom = exports.switzerland = exports.sweden = exports.spain = exports.slovenia = exports.slovakiaRepublic = exports.serbia = exports.russia = exports.romania = exports.portugal = exports.poland = exports.norway = exports.netherlands = exports.malta = exports.luxembourg = exports.lithuania = exports.latvia = exports.italy = exports.ireland = exports.hungary = exports.greece = exports.germany = exports.france = exports.finland = exports.europe = exports.estonia = exports.denmark = exports.czechRepublic = exports.cyprus = exports.croatia = exports.bulgaria = exports.brazil = exports.belgium = exports.austria = exports.andorra = exports.countries = void 0;
45
exports.countries = [
56
countries_1.andorra,
67
countries_1.austria,
@@ -38,40 +39,40 @@ define(["require", "exports", "./lib/countries", "./lib/countries", "./lib/jsvat
3839
countries_1.switzerland,
3940
countries_1.unitedKingdom
4041
];
41-
exports.andorra = countries_2.andorra;
42-
exports.austria = countries_2.austria;
43-
exports.belgium = countries_2.belgium;
44-
exports.brazil = countries_2.brazil;
45-
exports.bulgaria = countries_2.bulgaria;
46-
exports.croatia = countries_2.croatia;
47-
exports.cyprus = countries_2.cyprus;
48-
exports.czechRepublic = countries_2.czechRepublic;
49-
exports.denmark = countries_2.denmark;
50-
exports.estonia = countries_2.estonia;
51-
exports.europe = countries_2.europe;
52-
exports.finland = countries_2.finland;
53-
exports.france = countries_2.france;
54-
exports.germany = countries_2.germany;
55-
exports.greece = countries_2.greece;
56-
exports.hungary = countries_2.hungary;
57-
exports.ireland = countries_2.ireland;
58-
exports.italy = countries_2.italy;
59-
exports.latvia = countries_2.latvia;
60-
exports.lithuania = countries_2.lithuania;
61-
exports.luxembourg = countries_2.luxembourg;
62-
exports.malta = countries_2.malta;
63-
exports.netherlands = countries_2.netherlands;
64-
exports.norway = countries_2.norway;
65-
exports.poland = countries_2.poland;
66-
exports.portugal = countries_2.portugal;
67-
exports.romania = countries_2.romania;
68-
exports.russia = countries_2.russia;
69-
exports.serbia = countries_2.serbia;
70-
exports.slovakiaRepublic = countries_2.slovakiaRepublic;
71-
exports.slovenia = countries_2.slovenia;
72-
exports.spain = countries_2.spain;
73-
exports.sweden = countries_2.sweden;
74-
exports.switzerland = countries_2.switzerland;
75-
exports.unitedKingdom = countries_2.unitedKingdom;
76-
exports.checkVAT = jsvat_1.checkVAT;
42+
Object.defineProperty(exports, "andorra", { enumerable: true, get: function () { return countries_2.andorra; } });
43+
Object.defineProperty(exports, "austria", { enumerable: true, get: function () { return countries_2.austria; } });
44+
Object.defineProperty(exports, "belgium", { enumerable: true, get: function () { return countries_2.belgium; } });
45+
Object.defineProperty(exports, "brazil", { enumerable: true, get: function () { return countries_2.brazil; } });
46+
Object.defineProperty(exports, "bulgaria", { enumerable: true, get: function () { return countries_2.bulgaria; } });
47+
Object.defineProperty(exports, "croatia", { enumerable: true, get: function () { return countries_2.croatia; } });
48+
Object.defineProperty(exports, "cyprus", { enumerable: true, get: function () { return countries_2.cyprus; } });
49+
Object.defineProperty(exports, "czechRepublic", { enumerable: true, get: function () { return countries_2.czechRepublic; } });
50+
Object.defineProperty(exports, "denmark", { enumerable: true, get: function () { return countries_2.denmark; } });
51+
Object.defineProperty(exports, "estonia", { enumerable: true, get: function () { return countries_2.estonia; } });
52+
Object.defineProperty(exports, "europe", { enumerable: true, get: function () { return countries_2.europe; } });
53+
Object.defineProperty(exports, "finland", { enumerable: true, get: function () { return countries_2.finland; } });
54+
Object.defineProperty(exports, "france", { enumerable: true, get: function () { return countries_2.france; } });
55+
Object.defineProperty(exports, "germany", { enumerable: true, get: function () { return countries_2.germany; } });
56+
Object.defineProperty(exports, "greece", { enumerable: true, get: function () { return countries_2.greece; } });
57+
Object.defineProperty(exports, "hungary", { enumerable: true, get: function () { return countries_2.hungary; } });
58+
Object.defineProperty(exports, "ireland", { enumerable: true, get: function () { return countries_2.ireland; } });
59+
Object.defineProperty(exports, "italy", { enumerable: true, get: function () { return countries_2.italy; } });
60+
Object.defineProperty(exports, "latvia", { enumerable: true, get: function () { return countries_2.latvia; } });
61+
Object.defineProperty(exports, "lithuania", { enumerable: true, get: function () { return countries_2.lithuania; } });
62+
Object.defineProperty(exports, "luxembourg", { enumerable: true, get: function () { return countries_2.luxembourg; } });
63+
Object.defineProperty(exports, "malta", { enumerable: true, get: function () { return countries_2.malta; } });
64+
Object.defineProperty(exports, "netherlands", { enumerable: true, get: function () { return countries_2.netherlands; } });
65+
Object.defineProperty(exports, "norway", { enumerable: true, get: function () { return countries_2.norway; } });
66+
Object.defineProperty(exports, "poland", { enumerable: true, get: function () { return countries_2.poland; } });
67+
Object.defineProperty(exports, "portugal", { enumerable: true, get: function () { return countries_2.portugal; } });
68+
Object.defineProperty(exports, "romania", { enumerable: true, get: function () { return countries_2.romania; } });
69+
Object.defineProperty(exports, "russia", { enumerable: true, get: function () { return countries_2.russia; } });
70+
Object.defineProperty(exports, "serbia", { enumerable: true, get: function () { return countries_2.serbia; } });
71+
Object.defineProperty(exports, "slovakiaRepublic", { enumerable: true, get: function () { return countries_2.slovakiaRepublic; } });
72+
Object.defineProperty(exports, "slovenia", { enumerable: true, get: function () { return countries_2.slovenia; } });
73+
Object.defineProperty(exports, "spain", { enumerable: true, get: function () { return countries_2.spain; } });
74+
Object.defineProperty(exports, "sweden", { enumerable: true, get: function () { return countries_2.sweden; } });
75+
Object.defineProperty(exports, "switzerland", { enumerable: true, get: function () { return countries_2.switzerland; } });
76+
Object.defineProperty(exports, "unitedKingdom", { enumerable: true, get: function () { return countries_2.unitedKingdom; } });
77+
Object.defineProperty(exports, "checkVAT", { enumerable: true, get: function () { return jsvat_1.checkVAT; } });
7778
});

lib/amd/lib/countries/andorra.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.andorra = void 0;
45
exports.andorra = {
56
name: 'Andorra',
67
codes: ['AD', 'AND', '020'],

lib/amd/lib/countries/austria.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.austria = void 0;
45
exports.austria = {
56
name: 'Austria',
67
codes: ['AT', 'AUT', '040'],

lib/amd/lib/countries/belgium.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.belgium = void 0;
45
exports.belgium = {
56
name: 'Belgium',
67
codes: ['BE', 'BEL', '056'],

lib/amd/lib/countries/brazil.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.brazil = void 0;
45
/**
56
* Generate check sums. Multiply numbers to validators and sum them to generate
67
* check sums, they're used to check if numbers are valid.
@@ -9,28 +10,25 @@ define(["require", "exports"], function (require, exports) {
910
*/
1011
const generateCheckSums = (numbers, validators) => {
1112
const initialCheckSums = [0, 0];
12-
return validators.reduce(([checkerA, checkerB], validator, index) => [
13-
(index === 0) ? 0 : (checkerA + numbers[index - 1] * validator),
14-
checkerB + numbers[index] * validator
15-
], initialCheckSums);
13+
return validators.reduce(([checkerA, checkerB], validator, index) => [index === 0 ? 0 : checkerA + numbers[index - 1] * validator, checkerB + numbers[index] * validator], initialCheckSums);
1614
};
1715
const isRepeatedArray = (varNumbers) => varNumbers.every((varNumber) => varNumbers[0] === varNumber);
1816
/**
1917
* Get remaining of 11 or `0` if lower than 2.
2018
* @param value - Value used remaining.
2119
*/
22-
const getRemaining = (value) => (value % 11) < 2 ? 0 : 11 - (value % 11);
20+
const getRemaining = (value) => (value % 11 < 2 ? 0 : 11 - (value % 11));
2321
exports.brazil = {
2422
name: 'Brazil',
2523
codes: ['BR', 'BRA', '076'],
2624
calcFn: (vat) => {
2725
const numbers = vat.split('').map(Number);
28-
if (isRepeatedArray(numbers))
26+
if (isRepeatedArray(numbers)) {
2927
return false;
28+
}
3029
const validators = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2];
3130
const checkers = generateCheckSums(numbers, validators);
32-
return (numbers[12] === getRemaining(checkers[0]) &&
33-
numbers[13] === getRemaining(checkers[1]));
31+
return numbers[12] === getRemaining(checkers[0]) && numbers[13] === getRemaining(checkers[1]);
3432
},
3533
rules: {
3634
multipliers: {},

lib/amd/lib/countries/bulgaria.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.bulgaria = void 0;
45
exports.bulgaria = {
56
name: 'Bulgaria',
67
codes: ['BG', 'BGR', '100'],

lib/amd/lib/countries/croatiat.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.croatia = void 0;
45
exports.croatia = {
56
name: 'Croatia',
67
codes: ['HR', 'HRV', '191'],

lib/amd/lib/countries/cyprus.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.cyprus = void 0;
45
exports.cyprus = {
56
name: 'Cyprus',
67
codes: ['CY', 'CYP', '196'],

lib/amd/lib/countries/czechRepublic.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.czechRepublic = void 0;
45
exports.czechRepublic = {
56
name: 'Czech Republic',
67
codes: ['CZ', 'CZE', '203'],

lib/amd/lib/countries/denmark.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.denmark = void 0;
45
exports.denmark = {
56
name: 'Denmark',
67
codes: ['DK', 'DNK', '208'],

lib/amd/lib/countries/estonia.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.estonia = void 0;
45
exports.estonia = {
56
name: 'Estonia',
67
codes: ['EE', 'EST', '233'],

lib/amd/lib/countries/europe.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.europe = void 0;
45
exports.europe = {
56
name: 'Europe',
67
codes: ['EU', 'EUR', '000'],

lib/amd/lib/countries/finland.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.finland = void 0;
45
exports.finland = {
56
name: 'Finland',
67
codes: ['FI', 'FIN', '246'],

lib/amd/lib/countries/france.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.france = void 0;
45
exports.france = {
56
name: 'France',
67
codes: ['FR', 'FRA', '250'],

lib/amd/lib/countries/germany.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.germany = void 0;
45
exports.germany = {
56
name: 'Germany',
67
codes: ['DE', 'DEU', '276'],

lib/amd/lib/countries/greece.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.greece = void 0;
45
exports.greece = {
56
name: 'Greece',
67
codes: ['GR', 'GRC', '300'],

lib/amd/lib/countries/hungary.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
define(["require", "exports"], function (require, exports) {
22
"use strict";
33
Object.defineProperty(exports, "__esModule", { value: true });
4+
exports.hungary = void 0;
45
exports.hungary = {
56
name: 'Hungary',
67
codes: ['HU', 'HUN', '348'],

0 commit comments

Comments
 (0)