Skip to content

Commit

Permalink
Merging in a patch for _ = require('underscore')
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Nov 30, 2010
1 parent a3106a9 commit 71439c3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@
// Create a safe reference to the Underscore object for use below.
var _ = function(obj) { return new wrapper(obj); };

// Export the Underscore object for **CommonJS**, with backwards-compatibility
// for the old `require()` API. If we're not in CommonJS, add `_` to the
// global object.
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._ = _;
}

Expand Down

0 comments on commit 71439c3

Please sign in to comment.