diff --git a/bower.json b/bower.json index 4640b6a..82b1ed7 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "vatrates", "description": "Up-to-date European VAT Rates", - "version": "1.0.6", + "version": "1.1.0", "keywords": [ "VAT", "rates", diff --git a/package.json b/package.json index 8374738..fa5187e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vatrates", "title": "VATRates", - "version": "1.0.6", + "version": "1.1.0", "description": "Up-to-date European VAT Rates", "keywords": [ "VAT", diff --git a/vatrates.js b/vatrates.js index 28d5dfc..9042309 100644 --- a/vatrates.js +++ b/vatrates.js @@ -1,9 +1,21 @@ /*! - * VATRates - v1.0.2 + * VATRates - v1.1.0 * MIT License */ -(function(window) { +// UMD wrapper +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD + define([], factory); + } else if (typeof module === 'object' && module.exports) { + // Node/CommonJS + module.exports = factory(); + } else { + // Browser global + root.VATRates = factory(); + } +}(this, function() { var VATRates = { "AT": { @@ -311,16 +323,6 @@ var VATRates = { } }; -// export -if (typeof define === 'function' && define.amd) { - // AMD - define(VATRates); -} else if (typeof exports === 'object') { - // CommonJS - module.exports = VATRates; -} else { - // global - window.VATRates = VATRates; -} - -})(this); +return VATRates; + +})); diff --git a/vatrates.php b/vatrates.php index 7f19729..1929a45 100644 --- a/vatrates.php +++ b/vatrates.php @@ -1,6 +1,6 @@