Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Commit

Permalink
Improved UMD wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
staaky committed Aug 20, 2015
1 parent eb02cc0 commit a8a8b63
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vatrates",
"description": "Up-to-date European VAT Rates",
"version": "1.0.6",
"version": "1.1.0",
"keywords": [
"VAT",
"rates",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
32 changes: 17 additions & 15 deletions vatrates.js
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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;

}));
2 changes: 1 addition & 1 deletion vatrates.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*!
* VATRates - v1.0.2
* VATRates - v1.1.0
* MIT License
*/

Expand Down

0 comments on commit a8a8b63

Please sign in to comment.