Core: Use named exports in `src/`
[jquery.git] / src / wrapper-esm.js
blob00ff2995c382001e0412528419f971a62f9ead57
1 /*!
2  * jQuery JavaScript Library v@VERSION
3  * https://jquery.com/
4  *
5  * Copyright OpenJS Foundation and other contributors
6  * Released under the MIT license
7  * https://jquery.org/license
8  *
9  * Date: @DATE
10  */
11 // For ECMAScript module environments where a proper `window`
12 // is present, execute the factory and get jQuery.
13 // For environments that do not have a `window` with a `document`
14 // (such as Node.js), expose a factory as module.exports.
15 // This accentuates the need for the creation of a real `window`.
16 // e.g. var jQuery = require("jquery")(window);
17 // See ticket trac-14549 for more info.
18 var jQueryOrJQueryFactory = typeof window !== "undefined" && window.document ?
19         jQueryFactory( window, true ) :
20         function( w ) {
21                 if ( !w.document ) {
22                         throw new Error( "jQuery requires a window with a document" );
23                 }
24                 return jQueryFactory( w );
25         };
27 function jQueryFactory( window, noGlobal ) {
29 // @CODE
30 // build.js inserts compiled jQuery here
32 return jQuery;
36 export {
37         jQueryOrJQueryFactory as jQuery,
38         jQueryOrJQueryFactory as $
41 export default jQueryOrJQueryFactory;