Skip to content

Instantly share code, notes, and snippets.

@davidhellsing
Last active December 28, 2015 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidhellsing/7488964 to your computer and use it in GitHub Desktop.
Save davidhellsing/7488964 to your computer and use it in GitHub Desktop.
Module prefix
(function(a, i, n, o) {
n = i.length && typeof require == 'function' ? (function(e, j, q) {
q = []
for(j=0; j<i.length; j++){
q.push(require(i[j]))
}
return e.apply(o, q)
}(n)) : n.call(o)
if( typeof module == 'object' ) {
module.exports = n
} else if( typeof define == 'function' ) {
define(a, i, n)
} else {
o[a] = n;
}
})('Lipsum', ['jquery'], function($) {
// $ == jquery
}, this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment