@@ -1468,7 +1468,6 @@ exports.right = function(str){
1468
1468
1469
1469
} , { } ] ,
1470
1470
19 : [ function ( require , module , exports ) {
1471
-
1472
1471
/**
1473
1472
* toString ref.
1474
1473
*/
@@ -1485,18 +1484,21 @@ var toString = Object.prototype.toString;
1485
1484
1486
1485
module . exports = function ( val ) {
1487
1486
switch ( toString . call ( val ) ) {
1488
- case '[object Function]' : return 'function' ;
1489
1487
case '[object Date]' : return 'date' ;
1490
1488
case '[object RegExp]' : return 'regexp' ;
1491
1489
case '[object Arguments]' : return 'arguments' ;
1492
1490
case '[object Array]' : return 'array' ;
1493
- case '[object String ]' : return 'string ' ;
1491
+ case '[object Error ]' : return 'error ' ;
1494
1492
}
1495
1493
1496
1494
if ( val === null ) return 'null' ;
1497
1495
if ( val === undefined ) return 'undefined' ;
1496
+ if ( val !== val ) return 'nan' ;
1498
1497
if ( val && val . nodeType === 1 ) return 'element' ;
1499
- if ( val === Object ( val ) ) return 'object' ;
1498
+
1499
+ val = val . valueOf
1500
+ ? val . valueOf ( )
1501
+ : Object . prototype . valueOf . apply ( val )
1500
1502
1501
1503
return typeof val ;
1502
1504
} ;
@@ -1835,7 +1837,7 @@ module.exports = localStorage;
1835
1837
* console.log(agentInfo.browser.family); // Chrome
1836
1838
*
1837
1839
*/
1838
- ( function ( root , undefined ) {
1840
+ var detect = ( function ( root , undefined ) {
1839
1841
// Shim Array.prototype.map if necessary
1840
1842
// Production steps of ECMA-262, Edition 5, 15.4.4.19
1841
1843
// Reference: http://es5.github.com/#x15.4.4.19
@@ -2338,28 +2340,11 @@ module.exports = localStorage;
2338
2340
// Return context
2339
2341
return _this ;
2340
2342
} ( ) ;
2341
- // Export the Underscore object for **Node.js** and **"CommonJS"**,
2342
- // backwards-compatibility for the old `require()` API. If we're not
2343
- // CommonJS, add `_` to the global object via a string identifier
2344
- // the Closure Compiler "advanced" mode. Registration as an AMD
2345
- // via define() happens at the end of this file
2346
- if ( typeof exports !== "undefined" ) {
2347
- if ( typeof module !== "undefined" && module . exports ) {
2348
- exports = module . exports = detect ;
2349
- }
2350
- exports . detect = detect ;
2351
- } else {
2352
- root [ "detect" ] = detect ;
2353
- }
2354
- // AMD define happens at the end for compatibility with AMD
2355
- // that don't enforce next-turn semantics on modules
2356
- if ( typeof define === "function" && define . amd ) {
2357
- define ( function ( require ) {
2358
- return detect ;
2359
- } ) ;
2360
- }
2343
+ return detect ;
2361
2344
} ) ( window ) ;
2362
2345
2346
+ module . exports = detect ;
2347
+
2363
2348
} , { } ] ,
2364
2349
12 : [ function ( require , module , exports ) {
2365
2350
module . exports = '2.0.1' ;
0 commit comments