diff --git a/src/lib/regexanalyzer/CHANGES.md b/src/lib/regexanalyzer/CHANGES.md index 9e0232e4b681f..3c4eb8bd7bacf 100644 --- a/src/lib/regexanalyzer/CHANGES.md +++ b/src/lib/regexanalyzer/CHANGES.md @@ -5,6 +5,11 @@ Author: Nikos M. ## Changes to the imported library -date: 2022-11-17 -commit: d51b7e082b73db745a1f8321e65b086902d80d80 -github link: +#### Date + +2023-01-01 + +Imported version 1.2.0 of the library from +https://github.com/foo123/RegexAnalyzer/blob/1.2.0/src/js/Regex.js + +Minimally modified the code to make it ECMAscript `export`-/`import`-friendly. diff --git a/src/lib/regexanalyzer/regex.js b/src/lib/regexanalyzer/regex.js index 1a0dd9c9bc06e..35a27169769de 100644 --- a/src/lib/regexanalyzer/regex.js +++ b/src/lib/regexanalyzer/regex.js @@ -7,21 +7,7 @@ * https://github.com/foo123/RegexAnalyzer * **/ -!function(root, name, factory) { -"use strict"; -if (('undefined'!==typeof Components)&&('object'===typeof Components.classes)&&('object'===typeof Components.classesByID)&&Components.utils&&('function'===typeof Components.utils['import'])) /* XPCOM */ - (root.$deps = root.$deps||{}) && (root.EXPORTED_SYMBOLS = [name]) && (root[name] = root.$deps[name] = factory.call(root)); -else if (('object'===typeof module)&&module.exports) /* CommonJS */ - (module.$deps = module.$deps||{}) && (module.exports = module.$deps[name] = factory.call(root)); -else if (('undefined'!==typeof System)&&('function'===typeof System.register)&&('function'===typeof System['import'])) /* ES6 module */ - System.register(name,[],function($__export){$__export(name, factory.call(root));}); -else if (('function'===typeof define)&&define.amd&&('function'===typeof require)&&('function'===typeof require.specified)&&require.specified(name) /*&& !require.defined(name)*/) /* AMD */ - define(name,['module'],function(module){factory.moduleUri = module.uri; return factory.call(root);}); -else if (!(name in root)) /* Browser/WebWorker/.. */ - (root[name] = factory.call(root)||1)&&('function'===typeof(define))&&define.amd&&define(function(){return root[name];} ); -}( /* current root */ 'undefined' !== typeof self ? self : this, - /* module name */ "Regex", - /* module factory */ function ModuleFactory__Regex(undef) { +export default (function(root, name, factory) { "use strict"; var __version__ = "1.2.0", @@ -2287,4 +2273,4 @@ var Regex = { }; /* export the module */ return Regex; -}); +})();