Last active
December 21, 2015 13:09
-
-
Save varemenos/6311119 to your computer and use it in GitHub Desktop.
JavaScript - Modularity
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
(function () { | |
'use strict'; | |
// change "moduleName" to the name of the module you are making | |
var moduleName = {}; | |
// do something | |
if (typeof module !== 'undefined' && module.exports) { | |
module.exports = moduleName; | |
} else { | |
window.moduleName = moduleName; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment