Skip to content

Instantly share code, notes, and snippets.

View adamjmcintyre's full-sized avatar

Adam J. McIntyre adamjmcintyre

View GitHub Profile
@adamjmcintyre
adamjmcintyre / strict-boilerplate
Created May 11, 2012 14:47
Boilerplate for creating namespaced modules in js strict mode
;(function(win, $){
"use strict";
// Check to see if our global is available as a member of window; if it is, our namespace root exists; if not, we'll create it.
var foospace = win.foospace = (typeof win.foospace !== "undefined") ? win.foospace : {};
(foospace.module = function(){
return{
_init : function(){
// Etc. etc.