I\'m considering adopting browserify for some of my projects, but would like to make sure that others don\'t have to use browserify if they want to use the (bundled) code. The o
Assuming another library hasn't created a global module.exports object, you can simply check for the existence of module.exports
var mymodule = (function() { ... })(); if (module && module.exports) { module.exports = mymodule; } else { window.mymodule = mymodule; }