Created
October 10, 2012 01:34
-
-
Save founddrama/3862622 to your computer and use it in GitHub Desktop.
Replying to module example here: <http://blog.newrelic.com/2012/10/09/helpful-javascript-patterns/>
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
window.NR = window.NR || {}; | |
window.NR.myModule = (function () { | |
"use strict"; | |
function initialize() { | |
// your initialization code here | |
} | |
function anotherMethod() { | |
// its function body here | |
} | |
return { | |
myVariable: "foo", | |
initialize: initialize, | |
anotherMethod: anotherMethod | |
}; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment