Skip to content

Commit

Permalink
Make the exports system include the wrapper function in node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
creationix committed Nov 9, 2009
1 parent f6e67a5 commit 111f1cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion underscore-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion underscore.js
Expand Up @@ -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';
Expand Down

0 comments on commit 111f1cb

Please sign in to comment.