// This is being exposed no matter what because there are too many weird
// usecases for how people use Raven. If this is really a problem, I'm sorry.
window.Raven = Raven;

// Expose Raven to the world
if (typeof define === 'function' && define.amd) {
    // AMD
    define('raven', [], function() {
      return Raven;
    });
} else if (typeof module === 'object') {
    // browserify
    module.exports = Raven;
} else if (typeof exports === 'object') {
    // CommonJS
    exports = Raven;
}

})(typeof window !== 'undefined' ? window : this);

// This is being exposed no matter what because there are too many weird
// usecases for how people use Raven. If this is really a problem, I'm sorry.
window.Raven = Raven;

// Expose Raven to the world
if (typeof define === 'function' && define.amd) {
    // AMD
    define('raven', [], function() {
      return Raven;
    });
} else if (typeof module === 'object' && module.exports) {
    // browserify
    module.exports = Raven;
}

})(typeof window !== 'undefined' ? window : this);

Use a more thorough check when exporting.
Use a more thorough check when exporting.

If an element with ID of `module` is in the document, `module.exports` could be
defined wrongly. This adds a check to ensure `module.exports` exists first.
This commit also removes the `exports` branch which wasn't doing anything,
and also is only used in old environments without `module.exports` support,
such as Narwhal and older versions of Ringo, which are no longer in use.
