Skip to content

Instantly share code, notes, and snippets.

@SvenPam
Last active January 25, 2017 15:21
Show Gist options
  • Save SvenPam/d979143ccdf9149b1c5e5d84ef43cfda to your computer and use it in GitHub Desktop.
Save SvenPam/d979143ccdf9149b1c5e5d84ef43cfda to your computer and use it in GitHub Desktop.
Module Design Pattern for JS...because I always forget the template.
'use strict';
// Module description
var module = (function ($) {
function privateFunction()
return {
publicFunction: function () {
privateFunction();
}
}
}(jQuery));
module.publicFunction();
@SvenPam
Copy link
Author

SvenPam commented Jan 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment