Make the exports system include the wrapper function in node.js

This commit is contained in:
Tim Caswell
2009-11-09 16:46:34 -06:00
parent f6e67a5bf2
commit 111f1cbc0d
2 changed files with 7 additions and 2 deletions

2
underscore-min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -25,7 +25,12 @@
var _ = root._ = function(obj) { return new wrapper(obj); };
// Export the Underscore object for CommonJS.
if (typeof exports !== 'undefined') _ = exports;
if (module && typeof module.exports !== 'undefined') {
// richer binding for systems that allow it (node.js for example)
module.exports = _;
} else {
if (typeof exports !== 'undefined') _ = exports;
}
// Current version.
_.VERSION = '0.4.2';