Skip to content

Instantly share code, notes, and snippets.

@thiago-negri
Last active October 27, 2015 02:30
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 thiago-negri/b9f008ae12d926ad9b32 to your computer and use it in GitHub Desktop.
Save thiago-negri/b9f008ae12d926ad9b32 to your computer and use it in GitHub Desktop.
/*
File...: foo.js
Exports: bar, baz
Depends: spam, eggs
*/
;(function (namespace) {
'use strict'
namespace.foo = function (namespace) {
/* Dependencies */
var spam = namespace.spam
var eggs = namespace.eggs
function bar () {
}
function baz () {
}
/* Exports */
namespace.bar = bar
namespace.baz = baz
}
}((function () {
if (typeof window === 'undefined') {
return module.exports
} else {
return window
}
}())))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment