Skip to content

Commit 0d4b124

Browse files
committed
Removing AMD 'support' from Underscore.
1 parent 0b74f2d commit 0d4b124

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

underscore.js

+4-9
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,16 @@
4848
// Create a safe reference to the Underscore object for use below.
4949
var _ = function(obj) { return new wrapper(obj); };
5050

51-
// Export the Underscore object for **Node.js** and **"CommonJS"**, with
52-
// backwards-compatibility for the old `require()` API. If we're not in
53-
// CommonJS, add `_` to the global object.
51+
// Export the Underscore object for **Node.js**, with
52+
// backwards-compatibility for the old `require()` API. If we're in
53+
// the browser, add `_` as a global object via a string identifier,
54+
// for Closure Compiler "advanced" mode.
5455
if (typeof exports !== 'undefined') {
5556
if (typeof module !== 'undefined' && module.exports) {
5657
exports = module.exports = _;
5758
}
5859
exports._ = _;
59-
} else if (typeof define === 'function' && define.amd) {
60-
// Register as a named module with AMD.
61-
define('underscore', function() {
62-
return _;
63-
});
6460
} else {
65-
// Exported as a string, for Closure Compiler "advanced" mode.
6661
root['_'] = _;
6762
}
6863

0 commit comments

Comments
 (0)