Last active
June 27, 2024 16:16
-
-
Save ygotthilf/54dd84511a8bd07d4541 to your computer and use it in GitHub Desktop.
A module pattern that works on Browser, Node.js, Web Workers, ...
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
/** | |
* MyModule is a module that works on Browser, Node.js, Web Workers, ... | |
*/ | |
(function(global) { | |
'use strict'; | |
// Define your MyModule here | |
global.MyModule = (global.module || {}).exports = MyModule; | |
})(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment