aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation/var
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2023-09-12 02:27:19 +0200
committerGitHub <noreply@github.com>2023-09-12 02:27:19 +0200
commitf75daab09102a4dd5107deadb55d4a169f86254a (patch)
tree71e7b9076d61d7aed7569f51c57b8651e9c16bfc /src/manipulation/var
parent42e50f8c21fbfd08092ad81add4ac38982ef0841 (diff)
downloadjquery-f75daab09102a4dd5107deadb55d4a169f86254a.tar.gz
jquery-f75daab09102a4dd5107deadb55d4a169f86254a.zip
Core: Use named exports in `src/`
The `default` export is treated differently across tooling when transpiled to CommonJS - tools differ on whether `module.exports` represents the full module object or just its default export. Switch `src/` modules to named exports for tooling consistency. Fixes gh-5262 Closes gh-5292
Diffstat (limited to 'src/manipulation/var')
-rw-r--r--src/manipulation/var/rscriptType.js2
-rw-r--r--src/manipulation/var/rtagName.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/manipulation/var/rscriptType.js b/src/manipulation/var/rscriptType.js
index 879651c7c..e3977e94e 100644
--- a/src/manipulation/var/rscriptType.js
+++ b/src/manipulation/var/rscriptType.js
@@ -1 +1 @@
-export default ( /^$|^module$|\/(?:java|ecma)script/i );
+export var rscriptType = /^$|^module$|\/(?:java|ecma)script/i;
diff --git a/src/manipulation/var/rtagName.js b/src/manipulation/var/rtagName.js
index b35acc999..fceba6720 100644
--- a/src/manipulation/var/rtagName.js
+++ b/src/manipulation/var/rtagName.js
@@ -1,4 +1,4 @@
// rtagName captures the name from the first start tag in a string of HTML
// https://html.spec.whatwg.org/multipage/syntax.html#tag-open-state
// https://html.spec.whatwg.org/multipage/syntax.html#tag-name-state
-export default ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i );
+export var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i;