Skip to content

Instantly share code, notes, and snippets.

View brettjonesdev's full-sized avatar

Brett Jones brettjonesdev

View GitHub Profile
@jrburke
jrburke / a.js
Created November 23, 2011 05:25
Common module boilerplate that sets export value
// Define a module "a" that depends another module called "b". If
// that other module also uses this type of boilerplate, then
// in the browser, it will create a global .b that is used below.
// If you do not want to support the browser global path, then you
// can remove the `root` use and the passing `this` as the first arg to
// the top function.
(function(root, factory) {
if (typeof exports === 'object') {