Created
July 17, 2019 13:57
-
-
Save fliptopbox/064b549e2b81ecfe92c660d55c30678b to your computer and use it in GitHub Desktop.
A boilerplate for the UML module
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(root, factory, NS="myfunction") { if (typeof define === "function" && define.amd) { define([], factory); } else if (typeof exports === "object") { module.exports = factory(); } else { root[NS] = factory(); } })(this, function() | |
{ | |
/* | |
myfunction | |
Tell the user what your function does. | |
And perhaps leave them a usage example | |
NOTE: don't forget to change NS="myfunction" | |
that appears in the UML decoration, | |
that is the modules default namespace | |
*/ | |
return function () { | |
const value = helper(); | |
return `Kilroy says ... "${value}"` | |
} | |
function helper () { | |
return "I was here ..."; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment