File tree 1 file changed +4
-9
lines changed
1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 48
48
// Create a safe reference to the Underscore object for use below.
49
49
var _ = function ( obj ) { return new wrapper ( obj ) ; } ;
50
50
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.
54
55
if ( typeof exports !== 'undefined' ) {
55
56
if ( typeof module !== 'undefined' && module . exports ) {
56
57
exports = module . exports = _ ;
57
58
}
58
59
exports . _ = _ ;
59
- } else if ( typeof define === 'function' && define . amd ) {
60
- // Register as a named module with AMD.
61
- define ( 'underscore' , function ( ) {
62
- return _ ;
63
- } ) ;
64
60
} else {
65
- // Exported as a string, for Closure Compiler "advanced" mode.
66
61
root [ '_' ] = _ ;
67
62
}
68
63
You can’t perform that action at this time.
0 commit comments