Last active
August 6, 2023 06:02
-
-
Save kamleshchandnani/07c63f3d728672d91f97b69bbf700eed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File log.js | |
(function (global, factory) { | |
if (typeof define === "function" && define.amd) { | |
define(["exports"], factory); | |
} else if (typeof exports !== "undefined") { | |
factory(exports); | |
} else { | |
var mod = { | |
exports: {} | |
}; | |
factory(mod.exports); | |
global.log = mod.exports; | |
} | |
})(this, function (exports) { | |
"use strict"; | |
function log() { | |
console.log("Example of UMD module system"); | |
} | |
// expose log to other modules | |
exports.log = log; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment