From 51620869473bb8dcbe5ce7c0bae8bf5442d2120a Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Tue, 6 Jun 2023 22:35:48 +0200 Subject: Restructure the import setup to be clearer --- south-african-id-parser.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'south-african-id-parser.js') 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'; -- cgit v1.2.3