Created
September 23, 2015 04:48
-
-
Save dok/b4c1125f59c081de2fd2 to your computer and use it in GitHub Desktop.
Isomorphic module definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var root = this; | |
var name = 'dcss'; | |
function dcss() { | |
} | |
var proto = { | |
}; | |
proto.forEach(function(fn, key) { | |
dcss.prototype[key] = fn; | |
}); | |
if (typeof exports !== 'undefined') { | |
if (typeof module !== 'undefined' && module.exports) { | |
exports = module.exports = expose; | |
} | |
exports[name] = expose; | |
} else { | |
root[name] = expose; | |
} | |
if (typeof define === 'function' && define.amd) { | |
define(name, [], function() { | |
return dcss; | |
}); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment