Skip to content

Instantly share code, notes, and snippets.

@dlion
Created March 1, 2014 01:31
Show Gist options
  • Select an option

  • Save dlion/9283451 to your computer and use it in GitHub Desktop.

Select an option

Save dlion/9283451 to your computer and use it in GitHub Desktop.
//Import mixins
var myModule = (function ( JQ, _ ) {
function privateMethod1() {
JQ(".container").html("test");
}
function privateMethod2() {
console.log( _.min([10, 5, 100, 2, 1000]) );
}
return {
publicMethod: function() {
privateMethod1();
}
};
//Oull in jQuery and Underscore
})( jQuery, _ );
myModule.publicMethod();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment