Created
October 29, 2015 11:55
-
-
Save tomeightyeight/256663978646d3103b21 to your computer and use it in GitHub Desktop.
Revealing Module Pattern Example
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
var jquery = require('jquery'); | |
var dummy = (function($) { | |
"use strict"; | |
var _privateMethod = function() { | |
console.log('privateMethod'); | |
}; | |
var publicMethod = function() { | |
_privateMethod(); | |
console.log('publicMethod'); | |
}; | |
return { | |
publicMethod: publicMethod | |
}; | |
})(jquery); | |
module.exports = dummy; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment