New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vatrates

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vatrates - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

package-lock.json

649

dist/vatrates.js
/*!
* VATRates v2.0.2
* VATRates v2.0.3
* MIT License

@@ -18,10 +18,10 @@ */

/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)

@@ -33,23 +33,23 @@ /******/ var module = installedModules[moduleId] = {

/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports

@@ -65,3 +65,3 @@ /******/ __webpack_require__.d = function(exports, name, getter) {

/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules

@@ -75,9 +75,9 @@ /******/ __webpack_require__.n = function(module) {

/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports

@@ -91,616 +91,3 @@ /******/ return __webpack_require__(__webpack_require__.s = 4);

module.exports = {
"rates": [
{
"name": "Austria",
"code": "AT",
"countryCode": "AT",
"periods": [
{
"effectiveFrom": "2016-01-01",
"rates": {
"reduced": [
10,
13
],
"standard": 20,
"parking": 13
}
},
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
10
],
"standard": 20,
"parking": 12
}
}
]
},
{
"name": "Belgium",
"code": "BE",
"countryCode": "BE",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
6,
12
],
"standard": 21,
"parking": 12
}
}
]
},
{
"name": "Bulgaria",
"code": "BG",
"countryCode": "BG",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
9
],
"standard": 20
}
}
]
},
{
"name": "Croatia",
"code": "HR",
"countryCode": "HR",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
5,
13
],
"standard": 25
}
}
]
},
{
"name": "Cyprus",
"code": "CY",
"countryCode": "CY",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
5,
9
],
"standard": 19
}
}
]
},
{
"name": "Czech Republic",
"code": "CZ",
"countryCode": "CZ",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
10,
15
],
"standard": 21
}
}
]
},
{
"name": "Denmark",
"code": "DK",
"countryCode": "DK",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"standard": 25
}
}
]
},
{
"name": "Estonia",
"code": "EE",
"countryCode": "EE",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
9
],
"standard": 20
}
}
]
},
{
"name": "Germany",
"code": "DE",
"countryCode": "DE",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
7
],
"standard": 19
}
}
]
},
{
"name": "Greece",
"code": "EL",
"countryCode": "GR",
"periods": [
{
"effectiveFrom": "2016-06-01",
"rates": {
"reduced": [
6,
13
],
"standard": 24
}
},
{
"effectiveFrom": "2015-01-01",
"rates": {
"reduced": [
6,
13
],
"standard": 23
}
},
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
6.5,
13
],
"standard": 23
}
}
]
},
{
"name": "Finland",
"code": "FI",
"countryCode": "FI",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
10,
14
],
"standard": 24
}
}
]
},
{
"name": "France",
"code": "FR",
"countryCode": "FR",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"superReduced": 2.1,
"reduced": [
5.5,
10
],
"standard": 20
}
}
]
},
{
"name": "Hungary",
"code": "HU",
"countryCode": "HU",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
5,
18
],
"standard": 27
}
}
]
},
{
"name": "Ireland",
"code": "IE",
"countryCode": "IE",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"superReduced": 4.8,
"reduced": [
9,
13.5
],
"standard": 23,
"parking": 13.5
}
}
]
},
{
"name": "Italy",
"code": "IT",
"countryCode": "IT",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"superReduced": 4,
"reduced": [
5,
10
],
"standard": 22
}
}
]
},
{
"name": "Latvia",
"code": "LV",
"countryCode": "LV",
"periods": [
{
"effectiveFrom": "2018-01-01",
"rates": {
"superReduced": 5,
"reduced": [
12
],
"standard": 21
}
},
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
12
],
"standard": 21
}
}
]
},
{
"name": "Lithuania",
"code": "LT",
"countryCode": "LT",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
5,
9
],
"standard": 21
}
}
]
},
{
"name": "Luxembourg",
"code": "LU",
"countryCode": "LU",
"periods": [
{
"effectiveFrom": "2016-01-01",
"rates": {
"superReduced": 3,
"reduced": [
8
],
"standard": 17,
"parking": 14
}
},
{
"effectiveFrom": "2015-01-01",
"rates": {
"superReduced": 3,
"reduced": [
8,
14
],
"standard": 17,
"parking": 12
}
},
{
"effectiveFrom": "0000-01-01",
"rates": {
"superReduced": 3,
"reduced": [
6,
12
],
"standard": 15,
"parking": 12
}
}
]
},
{
"name": "Malta",
"code": "MT",
"countryCode": "MT",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
5,
7
],
"standard": 18
}
}
]
},
{
"name": "Netherlands",
"code": "NL",
"countryCode": "NL",
"periods": [
{
"effectiveFrom": "2019-01-01",
"rates": {
"reduced": [
9
],
"standard": 21
}
},
{
"effectiveFrom": "2012-01-01",
"rates": {
"reduced": [
6
],
"standard": 21
}
},
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
6
],
"standard": 19
}
}
]
},
{
"name": "Poland",
"code": "PL",
"countryCode": "PL",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
5,
8
],
"standard": 23
}
}
]
},
{
"name": "Portugal",
"code": "PT",
"countryCode": "PT",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
6,
13
],
"standard": 23,
"parking": 13
}
}
]
},
{
"name": "Romania",
"code": "RO",
"countryCode": "RO",
"periods": [
{
"effectiveFrom": "2017-01-01",
"rates": {
"reduced": [
5,
9
],
"standard": 19
}
},
{
"effectiveFrom": "2016-01-01",
"rates": {
"reduced": [
5,
9
],
"standard": 20
}
},
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
5,
9
],
"standard": 24
}
}
]
},
{
"name": "Slovakia",
"code": "SK",
"countryCode": "SK",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
10
],
"standard": 20
}
}
]
},
{
"name": "Slovenia",
"code": "SI",
"countryCode": "SI",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
9.5
],
"standard": 22
}
}
]
},
{
"name": "Spain",
"code": "ES",
"countryCode": "ES",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"superReduced": 4,
"reduced": [
10
],
"standard": 21
}
}
]
},
{
"name": "Sweden",
"code": "SE",
"countryCode": "SE",
"periods": [
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
6,
12
],
"standard": 25
}
}
]
},
{
"name": "United Kingdom",
"code": "UK",
"countryCode": "GB",
"periods": [
{
"effectiveFrom": "2011-01-04",
"rates": {
"reduced": [
5
],
"standard": 20
}
},
{
"effectiveFrom": "2010-01-01",
"rates": {
"reduced": [
5
],
"standard": 17.5
}
},
{
"effectiveFrom": "2008-12-01",
"rates": {
"reduced": [
5
],
"standard": 15
}
},
{
"effectiveFrom": "1991-03-19",
"rates": {
"reduced": [
8
],
"standard": 17.5
}
},
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [
8
],
"standard": 15
}
}
]
}
]
};
module.exports = {"rates":[{"name":"Austria","code":"AT","countryCode":"AT","periods":[{"effectiveFrom":"2016-01-01","rates":{"reduced":[10,13],"standard":20,"parking":13}},{"effectiveFrom":"0000-01-01","rates":{"reduced":[10],"standard":20,"parking":12}}]},{"name":"Belgium","code":"BE","countryCode":"BE","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[6,12],"standard":21,"parking":12}}]},{"name":"Bulgaria","code":"BG","countryCode":"BG","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[9],"standard":20}}]},{"name":"Croatia","code":"HR","countryCode":"HR","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[5,13],"standard":25}}]},{"name":"Cyprus","code":"CY","countryCode":"CY","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[5,9],"standard":19}}]},{"name":"Czech Republic","code":"CZ","countryCode":"CZ","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[10,15],"standard":21}}]},{"name":"Denmark","code":"DK","countryCode":"DK","periods":[{"effectiveFrom":"0000-01-01","rates":{"standard":25}}]},{"name":"Estonia","code":"EE","countryCode":"EE","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[9],"standard":20}}]},{"name":"Germany","code":"DE","countryCode":"DE","periods":[{"effectiveFrom":"2021-01-01","rates":{"reduced":[7],"standard":19}},{"effectiveFrom":"2020-07-01","rates":{"reduced":[5],"standard":16}},{"effectiveFrom":"2007-01-01","rates":{"reduced":[7],"standard":19}},{"effectiveFrom":"0000-01-01","rates":{"reduced":[7],"standard":16}}]},{"name":"Greece","code":"EL","countryCode":"GR","periods":[{"effectiveFrom":"2016-06-01","rates":{"reduced":[6,13],"standard":24}},{"effectiveFrom":"2015-01-01","rates":{"reduced":[6,13],"standard":23}},{"effectiveFrom":"0000-01-01","rates":{"reduced":[6.5,13],"standard":23}}]},{"name":"Finland","code":"FI","countryCode":"FI","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[10,14],"standard":24}}]},{"name":"France","code":"FR","countryCode":"FR","periods":[{"effectiveFrom":"0000-01-01","rates":{"superReduced":2.1,"reduced":[5.5,10],"standard":20}}]},{"name":"Hungary","code":"HU","countryCode":"HU","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[5,18],"standard":27}}]},{"name":"Ireland","code":"IE","countryCode":"IE","periods":[{"effectiveFrom":"0000-01-01","rates":{"superReduced":4.8,"reduced":[9,13.5],"standard":23,"parking":13.5}}]},{"name":"Italy","code":"IT","countryCode":"IT","periods":[{"effectiveFrom":"0000-01-01","rates":{"superReduced":4,"reduced":[5,10],"standard":22}}]},{"name":"Latvia","code":"LV","countryCode":"LV","periods":[{"effectiveFrom":"2018-01-01","rates":{"superReduced":5,"reduced":[12],"standard":21}},{"effectiveFrom":"0000-01-01","rates":{"reduced":[12],"standard":21}}]},{"name":"Lithuania","code":"LT","countryCode":"LT","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[5,9],"standard":21}}]},{"name":"Luxembourg","code":"LU","countryCode":"LU","periods":[{"effectiveFrom":"2016-01-01","rates":{"superReduced":3,"reduced":[8],"standard":17,"parking":14}},{"effectiveFrom":"2015-01-01","rates":{"superReduced":3,"reduced":[8,14],"standard":17,"parking":12}},{"effectiveFrom":"0000-01-01","rates":{"superReduced":3,"reduced":[6,12],"standard":15,"parking":12}}]},{"name":"Malta","code":"MT","countryCode":"MT","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[5,7],"standard":18}}]},{"name":"Netherlands","code":"NL","countryCode":"NL","periods":[{"effectiveFrom":"2019-01-01","rates":{"reduced":[9],"standard":21}},{"effectiveFrom":"2012-01-01","rates":{"reduced":[6],"standard":21}},{"effectiveFrom":"0000-01-01","rates":{"reduced":[6],"standard":19}}]},{"name":"Poland","code":"PL","countryCode":"PL","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[5,8],"standard":23}}]},{"name":"Portugal","code":"PT","countryCode":"PT","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[6,13],"standard":23,"parking":13}}]},{"name":"Romania","code":"RO","countryCode":"RO","periods":[{"effectiveFrom":"2017-01-01","rates":{"reduced":[5,9],"standard":19}},{"effectiveFrom":"2016-01-01","rates":{"reduced":[5,9],"standard":20}},{"effectiveFrom":"0000-01-01","rates":{"reduced":[5,9],"standard":24}}]},{"name":"Slovakia","code":"SK","countryCode":"SK","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[10],"standard":20}}]},{"name":"Slovenia","code":"SI","countryCode":"SI","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[9.5],"standard":22}}]},{"name":"Spain","code":"ES","countryCode":"ES","periods":[{"effectiveFrom":"0000-01-01","rates":{"superReduced":4,"reduced":[10],"standard":21}}]},{"name":"Sweden","code":"SE","countryCode":"SE","periods":[{"effectiveFrom":"0000-01-01","rates":{"reduced":[6,12],"standard":25}}]},{"name":"United Kingdom","code":"UK","countryCode":"GB","periods":[{"effectiveFrom":"2011-01-04","rates":{"reduced":[5],"standard":20}},{"effectiveFrom":"2010-01-01","rates":{"reduced":[5],"standard":17.5}},{"effectiveFrom":"2008-12-01","rates":{"reduced":[5],"standard":15}},{"effectiveFrom":"1991-03-19","rates":{"reduced":[8],"standard":17.5}},{"effectiveFrom":"0000-01-01","rates":{"reduced":[8],"standard":15}}]}]}

@@ -707,0 +94,0 @@ /***/ }),

/*!
* VATRates v2.0.2
* VATRates v2.0.3
* MIT License
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VATRates=t():e.VATRates=t()}(this,function(){return function(e){function t(d){if(r[d])return r[d].exports;var o=r[d]={i:d,l:!1,exports:{}};return e[d].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,d){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:d})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t){e.exports={rates:[{name:"Austria",code:"AT",countryCode:"AT",periods:[{effectiveFrom:"2016-01-01",rates:{reduced:[10,13],standard:20,parking:13}},{effectiveFrom:"0000-01-01",rates:{reduced:[10],standard:20,parking:12}}]},{name:"Belgium",code:"BE",countryCode:"BE",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[6,12],standard:21,parking:12}}]},{name:"Bulgaria",code:"BG",countryCode:"BG",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[9],standard:20}}]},{name:"Croatia",code:"HR",countryCode:"HR",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,13],standard:25}}]},{name:"Cyprus",code:"CY",countryCode:"CY",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,9],standard:19}}]},{name:"Czech Republic",code:"CZ",countryCode:"CZ",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[10,15],standard:21}}]},{name:"Denmark",code:"DK",countryCode:"DK",periods:[{effectiveFrom:"0000-01-01",rates:{standard:25}}]},{name:"Estonia",code:"EE",countryCode:"EE",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[9],standard:20}}]},{name:"Germany",code:"DE",countryCode:"DE",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[7],standard:19}}]},{name:"Greece",code:"EL",countryCode:"GR",periods:[{effectiveFrom:"2016-06-01",rates:{reduced:[6,13],standard:24}},{effectiveFrom:"2015-01-01",rates:{reduced:[6,13],standard:23}},{effectiveFrom:"0000-01-01",rates:{reduced:[6.5,13],standard:23}}]},{name:"Finland",code:"FI",countryCode:"FI",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[10,14],standard:24}}]},{name:"France",code:"FR",countryCode:"FR",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:2.1,reduced:[5.5,10],standard:20}}]},{name:"Hungary",code:"HU",countryCode:"HU",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,18],standard:27}}]},{name:"Ireland",code:"IE",countryCode:"IE",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:4.8,reduced:[9,13.5],standard:23,parking:13.5}}]},{name:"Italy",code:"IT",countryCode:"IT",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:4,reduced:[5,10],standard:22}}]},{name:"Latvia",code:"LV",countryCode:"LV",periods:[{effectiveFrom:"2018-01-01",rates:{superReduced:5,reduced:[12],standard:21}},{effectiveFrom:"0000-01-01",rates:{reduced:[12],standard:21}}]},{name:"Lithuania",code:"LT",countryCode:"LT",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,9],standard:21}}]},{name:"Luxembourg",code:"LU",countryCode:"LU",periods:[{effectiveFrom:"2016-01-01",rates:{superReduced:3,reduced:[8],standard:17,parking:14}},{effectiveFrom:"2015-01-01",rates:{superReduced:3,reduced:[8,14],standard:17,parking:12}},{effectiveFrom:"0000-01-01",rates:{superReduced:3,reduced:[6,12],standard:15,parking:12}}]},{name:"Malta",code:"MT",countryCode:"MT",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,7],standard:18}}]},{name:"Netherlands",code:"NL",countryCode:"NL",periods:[{effectiveFrom:"2019-01-01",rates:{reduced:[9],standard:21}},{effectiveFrom:"2012-01-01",rates:{reduced:[6],standard:21}},{effectiveFrom:"0000-01-01",rates:{reduced:[6],standard:19}}]},{name:"Poland",code:"PL",countryCode:"PL",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,8],standard:23}}]},{name:"Portugal",code:"PT",countryCode:"PT",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[6,13],standard:23,parking:13}}]},{name:"Romania",code:"RO",countryCode:"RO",periods:[{effectiveFrom:"2017-01-01",rates:{reduced:[5,9],standard:19}},{effectiveFrom:"2016-01-01",rates:{reduced:[5,9],standard:20}},{effectiveFrom:"0000-01-01",rates:{reduced:[5,9],standard:24}}]},{name:"Slovakia",code:"SK",countryCode:"SK",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[10],standard:20}}]},{name:"Slovenia",code:"SI",countryCode:"SI",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[9.5],standard:22}}]},{name:"Spain",code:"ES",countryCode:"ES",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:4,reduced:[10],standard:21}}]},{name:"Sweden",code:"SE",countryCode:"SE",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[6,12],standard:25}}]},{name:"United Kingdom",code:"UK",countryCode:"GB",periods:[{effectiveFrom:"2011-01-04",rates:{reduced:[5],standard:20}},{effectiveFrom:"2010-01-01",rates:{reduced:[5],standard:17.5}},{effectiveFrom:"2008-12-01",rates:{reduced:[5],standard:15}},{effectiveFrom:"1991-03-19",rates:{reduced:[8],standard:17.5}},{effectiveFrom:"0000-01-01",rates:{reduced:[8],standard:15}}]}]}},function(e,t,r){"use strict";var d=r(3),o=r(2),n=r(0),a=[];n&&n.rates&&n.rates.forEach(function(e){var t=[];e.periods&&e.periods.forEach(function(e){t.push(new d(new Date(e.effectiveFrom),e.rates.superReduced,e.rates.reduced,e.rates.standard,e.rates.parking))}),a.push(new o(e.name,e.code,e.countryCode,t))}),e.exports=a},function(e,t,r){"use strict";function d(e,t,r,d,o){this._name=e,this._code=t,this._countryCode=r,this._periods=d,this.setDate(o)}d.prototype.getName=function(){return this._name},d.prototype.getCode=function(){return this._code},d.prototype.getCountryCode=function(){return this._countryCode},d.prototype.getPeriods=function(){return this._periods},d.prototype.setDate=function(e){e||(e=new Date),this._date=e},d.prototype.getPeriod=function(e){for(var t,r=this._periods.length-1;r>=0;r--){var d=this._periods[r];d.getEffectiveFrom()<=e&&(t=d)}return t},d.prototype.getCurrentPeriod=function(){return this.getPeriod(this._date)},d.prototype.usedVATOnDate=function(e){var t=this.getPeriod(e);return!(!t||!t.getStandardRate())},d.prototype.usedVATOnCurrentDate=function(){return this.usedVATOnDate(this._date)},d.prototype.getSuperReducedRate=function(){var e=this.getCurrentPeriod();return e?e.getSuperReducedRate():void 0},d.prototype.getReducedRates=function(){var e=this.getCurrentPeriod();return e?e.getReducedRates():void 0},d.prototype.getStandardRate=function(){var e=this.getCurrentPeriod();return e?e.getStandardRate():void 0},d.prototype.getParkingRate=function(){var e=this.getCurrentPeriod();return e?e.getParkingRate():void 0},e.exports=d},function(e,t,r){"use strict";function d(e,t,r,d,o){this._effectiveFrom=e,this._superReduced=t,this._reduced=r,this._standard=d,this._parking=o}d.prototype.getEffectiveFrom=function(){return this._effectiveFrom},d.prototype.getSuperReducedRate=function(){return this._superReduced},d.prototype.getReducedRates=function(){return this._reduced},d.prototype.getStandardRate=function(){return this._standard},d.prototype.getParkingRate=function(){return this._parking},e.exports=d},function(e,t,r){"use strict";function d(e){this._countries=n,this.setDate(e)}var o=r(0),n=r(1);d.prototype.setDate=function(e){e?"string"==typeof e&&(e=new Date(e)):e=new Date,this._date=e;var t=[];this._countries.forEach(function(r){r.setDate(e),t.push(r)}),this._countries=t.length>0?t:void 0},d.prototype.getCountries=function(e){if(e)return this._countries;var t=[];return this._countries.forEach(function(e){e.usedVATOnCurrentDate()&&t.push(e)}),t},d.prototype.getCountry=function(e){e=e.toUpperCase();for(var t,r=this.getCountries(),d=0;d<r.length;d++)r[d].getCode()!==e&&r[d].getCountryCode()!==e||(t=r[d]);return t},d.prototype.isVATCountry=function(e){var t=this.getCountry(e);return!(!t||!t.usedVATOnCurrentDate())},d.prototype.getSuperReducedRate=function(e){var t,r;return(t=this.getCountry(e))&&(r=t.getSuperReducedRate()),r},d.prototype.getReducedRates=function(e){var t,r;return(t=this.getCountry(e))&&(r=t.getReducedRates()),r},d.prototype.getStandardRate=function(e){var t,r;return(t=this.getCountry(e))&&(r=t.getStandardRate()),r},d.prototype.getParkingRate=function(e){var t,r;return(t=this.getCountry(e))&&(r=t.getParkingRate()),r},d.prototype.getJSON=function(){return o},e.exports=d}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VATRates=t():e.VATRates=t()}(this,function(){return function(e){function t(d){if(r[d])return r[d].exports;var o=r[d]={i:d,l:!1,exports:{}};return e[d].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,d){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:d})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t){e.exports={rates:[{name:"Austria",code:"AT",countryCode:"AT",periods:[{effectiveFrom:"2016-01-01",rates:{reduced:[10,13],standard:20,parking:13}},{effectiveFrom:"0000-01-01",rates:{reduced:[10],standard:20,parking:12}}]},{name:"Belgium",code:"BE",countryCode:"BE",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[6,12],standard:21,parking:12}}]},{name:"Bulgaria",code:"BG",countryCode:"BG",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[9],standard:20}}]},{name:"Croatia",code:"HR",countryCode:"HR",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,13],standard:25}}]},{name:"Cyprus",code:"CY",countryCode:"CY",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,9],standard:19}}]},{name:"Czech Republic",code:"CZ",countryCode:"CZ",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[10,15],standard:21}}]},{name:"Denmark",code:"DK",countryCode:"DK",periods:[{effectiveFrom:"0000-01-01",rates:{standard:25}}]},{name:"Estonia",code:"EE",countryCode:"EE",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[9],standard:20}}]},{name:"Germany",code:"DE",countryCode:"DE",periods:[{effectiveFrom:"2021-01-01",rates:{reduced:[7],standard:19}},{effectiveFrom:"2020-07-01",rates:{reduced:[5],standard:16}},{effectiveFrom:"2007-01-01",rates:{reduced:[7],standard:19}},{effectiveFrom:"0000-01-01",rates:{reduced:[7],standard:16}}]},{name:"Greece",code:"EL",countryCode:"GR",periods:[{effectiveFrom:"2016-06-01",rates:{reduced:[6,13],standard:24}},{effectiveFrom:"2015-01-01",rates:{reduced:[6,13],standard:23}},{effectiveFrom:"0000-01-01",rates:{reduced:[6.5,13],standard:23}}]},{name:"Finland",code:"FI",countryCode:"FI",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[10,14],standard:24}}]},{name:"France",code:"FR",countryCode:"FR",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:2.1,reduced:[5.5,10],standard:20}}]},{name:"Hungary",code:"HU",countryCode:"HU",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,18],standard:27}}]},{name:"Ireland",code:"IE",countryCode:"IE",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:4.8,reduced:[9,13.5],standard:23,parking:13.5}}]},{name:"Italy",code:"IT",countryCode:"IT",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:4,reduced:[5,10],standard:22}}]},{name:"Latvia",code:"LV",countryCode:"LV",periods:[{effectiveFrom:"2018-01-01",rates:{superReduced:5,reduced:[12],standard:21}},{effectiveFrom:"0000-01-01",rates:{reduced:[12],standard:21}}]},{name:"Lithuania",code:"LT",countryCode:"LT",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,9],standard:21}}]},{name:"Luxembourg",code:"LU",countryCode:"LU",periods:[{effectiveFrom:"2016-01-01",rates:{superReduced:3,reduced:[8],standard:17,parking:14}},{effectiveFrom:"2015-01-01",rates:{superReduced:3,reduced:[8,14],standard:17,parking:12}},{effectiveFrom:"0000-01-01",rates:{superReduced:3,reduced:[6,12],standard:15,parking:12}}]},{name:"Malta",code:"MT",countryCode:"MT",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,7],standard:18}}]},{name:"Netherlands",code:"NL",countryCode:"NL",periods:[{effectiveFrom:"2019-01-01",rates:{reduced:[9],standard:21}},{effectiveFrom:"2012-01-01",rates:{reduced:[6],standard:21}},{effectiveFrom:"0000-01-01",rates:{reduced:[6],standard:19}}]},{name:"Poland",code:"PL",countryCode:"PL",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[5,8],standard:23}}]},{name:"Portugal",code:"PT",countryCode:"PT",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[6,13],standard:23,parking:13}}]},{name:"Romania",code:"RO",countryCode:"RO",periods:[{effectiveFrom:"2017-01-01",rates:{reduced:[5,9],standard:19}},{effectiveFrom:"2016-01-01",rates:{reduced:[5,9],standard:20}},{effectiveFrom:"0000-01-01",rates:{reduced:[5,9],standard:24}}]},{name:"Slovakia",code:"SK",countryCode:"SK",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[10],standard:20}}]},{name:"Slovenia",code:"SI",countryCode:"SI",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[9.5],standard:22}}]},{name:"Spain",code:"ES",countryCode:"ES",periods:[{effectiveFrom:"0000-01-01",rates:{superReduced:4,reduced:[10],standard:21}}]},{name:"Sweden",code:"SE",countryCode:"SE",periods:[{effectiveFrom:"0000-01-01",rates:{reduced:[6,12],standard:25}}]},{name:"United Kingdom",code:"UK",countryCode:"GB",periods:[{effectiveFrom:"2011-01-04",rates:{reduced:[5],standard:20}},{effectiveFrom:"2010-01-01",rates:{reduced:[5],standard:17.5}},{effectiveFrom:"2008-12-01",rates:{reduced:[5],standard:15}},{effectiveFrom:"1991-03-19",rates:{reduced:[8],standard:17.5}},{effectiveFrom:"0000-01-01",rates:{reduced:[8],standard:15}}]}]}},function(e,t,r){"use strict";var d=r(3),o=r(2),n=r(0),a=[];n&&n.rates&&n.rates.forEach(function(e){var t=[];e.periods&&e.periods.forEach(function(e){t.push(new d(new Date(e.effectiveFrom),e.rates.superReduced,e.rates.reduced,e.rates.standard,e.rates.parking))}),a.push(new o(e.name,e.code,e.countryCode,t))}),e.exports=a},function(e,t,r){"use strict";function d(e,t,r,d,o){this._name=e,this._code=t,this._countryCode=r,this._periods=d,this.setDate(o)}d.prototype.getName=function(){return this._name},d.prototype.getCode=function(){return this._code},d.prototype.getCountryCode=function(){return this._countryCode},d.prototype.getPeriods=function(){return this._periods},d.prototype.setDate=function(e){e||(e=new Date),this._date=e},d.prototype.getPeriod=function(e){for(var t,r=this._periods.length-1;r>=0;r--){var d=this._periods[r];d.getEffectiveFrom()<=e&&(t=d)}return t},d.prototype.getCurrentPeriod=function(){return this.getPeriod(this._date)},d.prototype.usedVATOnDate=function(e){var t=this.getPeriod(e);return!(!t||!t.getStandardRate())},d.prototype.usedVATOnCurrentDate=function(){return this.usedVATOnDate(this._date)},d.prototype.getSuperReducedRate=function(){var e=this.getCurrentPeriod();return e?e.getSuperReducedRate():void 0},d.prototype.getReducedRates=function(){var e=this.getCurrentPeriod();return e?e.getReducedRates():void 0},d.prototype.getStandardRate=function(){var e=this.getCurrentPeriod();return e?e.getStandardRate():void 0},d.prototype.getParkingRate=function(){var e=this.getCurrentPeriod();return e?e.getParkingRate():void 0},e.exports=d},function(e,t,r){"use strict";function d(e,t,r,d,o){this._effectiveFrom=e,this._superReduced=t,this._reduced=r,this._standard=d,this._parking=o}d.prototype.getEffectiveFrom=function(){return this._effectiveFrom},d.prototype.getSuperReducedRate=function(){return this._superReduced},d.prototype.getReducedRates=function(){return this._reduced},d.prototype.getStandardRate=function(){return this._standard},d.prototype.getParkingRate=function(){return this._parking},e.exports=d},function(e,t,r){"use strict";function d(e){this._countries=n,this.setDate(e)}var o=r(0),n=r(1);d.prototype.setDate=function(e){e?"string"==typeof e&&(e=new Date(e)):e=new Date,this._date=e;var t=[];this._countries.forEach(function(r){r.setDate(e),t.push(r)}),this._countries=t.length>0?t:void 0},d.prototype.getCountries=function(e){if(e)return this._countries;var t=[];return this._countries.forEach(function(e){e.usedVATOnCurrentDate()&&t.push(e)}),t},d.prototype.getCountry=function(e){e=e.toUpperCase();for(var t,r=this.getCountries(),d=0;d<r.length;d++)r[d].getCode()!==e&&r[d].getCountryCode()!==e||(t=r[d]);return t},d.prototype.isVATCountry=function(e){var t=this.getCountry(e);return!(!t||!t.usedVATOnCurrentDate())},d.prototype.getSuperReducedRate=function(e){var t,r;return(t=this.getCountry(e))&&(r=t.getSuperReducedRate()),r},d.prototype.getReducedRates=function(e){var t,r;return(t=this.getCountry(e))&&(r=t.getReducedRates()),r},d.prototype.getStandardRate=function(e){var t,r;return(t=this.getCountry(e))&&(r=t.getStandardRate()),r},d.prototype.getParkingRate=function(e){var t,r;return(t=this.getCountry(e))&&(r=t.getParkingRate()),r},d.prototype.getJSON=function(){return o},e.exports=d}])});
{
"name": "vatrates",
"title": "VATRates",
"version": "2.0.2",
"version": "2.0.3",
"description": "Up-to-date European VAT Rates",

@@ -6,0 +6,0 @@ "keywords": [

@@ -130,3 +130,3 @@ {

{
"effectiveFrom": "0000-01-01",
"effectiveFrom": "2021-01-01",
"rates": {

@@ -136,2 +136,23 @@ "reduced": [7],

}
},
{
"effectiveFrom": "2020-07-01",
"rates": {
"reduced": [5],
"standard": 16
}
},
{
"effectiveFrom": "2007-01-01",
"rates": {
"reduced": [7],
"standard": 19
}
},
{
"effectiveFrom": "0000-01-01",
"rates": {
"reduced": [7],
"standard": 16
}
}

@@ -138,0 +159,0 @@ ]

@@ -201,2 +201,16 @@ var chai = require('chai');

});
describe('limitedCutsForGermany', function() {
it('should return 16% and 5% after 2020-07-01', function() {
vatRates.setDate('2020-07-01');
expect(vatRates.getCountry('DE').getStandardRate()).to.equal(16);
expect(vatRates.getCountry('DE').getReducedRates()).to.eql([5]);
});
it('should return 19% and 7% again after 2021-01-01', function() {
vatRates.setDate('2021-01-01');
expect(vatRates.getCountry('DE').getStandardRate()).to.equal(19);
expect(vatRates.getCountry('DE').getReducedRates()).to.eql([7]);
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc