Skip to content

Instantly share code, notes, and snippets.

@tomeightyeight
Created October 29, 2015 11:55
Show Gist options
  • Save tomeightyeight/256663978646d3103b21 to your computer and use it in GitHub Desktop.
Save tomeightyeight/256663978646d3103b21 to your computer and use it in GitHub Desktop.
Revealing Module Pattern Example
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