Last active
March 18, 2021 06:20
-
-
Save littlebeeper/81e9708c881661e865d06dec743f942d to your computer and use it in GitHub Desktop.
Simple javascript module declaration
This file contains 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
const moduleName = ((wnd,doc,$)=>{ | |
'use strict'; | |
const onReady = (callback)=>{ | |
if (doc.readyState !== "loading") | |
callback(); | |
else | |
doc.addEventListener("DOMContentLoaded", callback); | |
} | |
onReady(()=>{ | |
} | |
); | |
function xFunction() {} | |
return { | |
publicFunction: xFunction | |
} | |
} | |
)(window, document, jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment