Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/josh/underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Nov 30, 2010
2 parents 9e3e067 + 538fea3 commit a3106a9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,16 @@
// Create a safe reference to the Underscore object for use below.
var _ = function(obj) { return new wrapper(obj); };

// Export the Underscore object for **CommonJS**.
if (typeof exports !== 'undefined') exports._ = _;

// Export Underscore to the global scope.
root._ = _;
if (typeof module !== 'undefined') {
// Export the Underscore object for **CommonJS**.
module.exports = _;

// Backwards compat with old requiring api
_._ = _;
} else {
// Export Underscore to the global scope.
root._ = _;
}

// Current version.
_.VERSION = '1.1.2';
Expand Down

0 comments on commit a3106a9

Please sign in to comment.