diff options
author | Justin Wernick <justin@worthe-it.co.za> | 2023-06-06 22:35:48 +0200 |
---|---|---|
committer | Justin Wernick <justin@worthe-it.co.za> | 2023-06-06 22:35:48 +0200 |
commit | 51620869473bb8dcbe5ce7c0bae8bf5442d2120a (patch) | |
tree | c5af9f3b5d46abfaae8580de0f35585d99145610 /south-african-id-parser.js | |
parent | 8ac7de8784f668abf12ba7718fd601a0ceb559d4 (diff) |
Restructure the import setup to be clearer
Diffstat (limited to 'south-african-id-parser.js')
-rw-r--r-- | south-african-id-parser.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/south-african-id-parser.js b/south-african-id-parser.js index 9b6d23f..81b2302 100644 --- a/south-african-id-parser.js +++ b/south-african-id-parser.js @@ -1,9 +1,13 @@ (function (global, factory) { 'use strict'; - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : + if (typeof exports === 'object' && typeof module !== 'undefined') { + module.exports = factory(); + } else if (typeof define === 'function' && define.amd) { + define(factory); + } else { global.saIdParser = factory(); + } }(this, (function () { 'use strict'; |