aboutsummaryrefslogtreecommitdiffstats
path: root/src/data/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/data/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/data/var')
-rw-r--r--src/data/var/acceptData.js2
-rw-r--r--src/data/var/dataPriv.js4
-rw-r--r--src/data/var/dataUser.js4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/data/var/acceptData.js b/src/data/var/acceptData.js
index 6b154c5b3..dbb93ee92 100644
--- a/src/data/var/acceptData.js
+++ b/src/data/var/acceptData.js
@@ -1,7 +1,7 @@
/**
* Determines whether an object can have data
*/
-export default function( owner ) {
+export function acceptData( owner ) {
// Accepts only:
// - Node
diff --git a/src/data/var/dataPriv.js b/src/data/var/dataPriv.js
index 94ea1190e..aaa43bd4e 100644
--- a/src/data/var/dataPriv.js
+++ b/src/data/var/dataPriv.js
@@ -1,3 +1,3 @@
-import Data from "../Data.js";
+import { Data } from "../Data.js";
-export default new Data();
+export var dataPriv = new Data();
diff --git a/src/data/var/dataUser.js b/src/data/var/dataUser.js
index 94ea1190e..a0504b628 100644
--- a/src/data/var/dataUser.js
+++ b/src/data/var/dataUser.js
@@ -1,3 +1,3 @@
-import Data from "../Data.js";
+import { Data } from "../Data.js";
-export default new Data();
+export var dataUser = new Data();