@@ -172,7 +172,7 @@ return /******/ (function(modules) { // webpackBootstrap
172
172
this . cert = opts . cert || null ;
173
173
this . ca = opts . ca || null ;
174
174
this . ciphers = opts . ciphers || null ;
175
- this . rejectUnauthorized = opts . rejectUnauthorized === undefined ? null : opts . rejectUnauthorized ;
175
+ this . rejectUnauthorized = opts . rejectUnauthorized === undefined ? true : opts . rejectUnauthorized ;
176
176
this . forceNode = ! ! opts . forceNode ;
177
177
178
178
// other options for Node.js client
@@ -2445,7 +2445,8 @@ return /******/ (function(modules) { // webpackBootstrap
2445
2445
/* 11 */
2446
2446
/***/ function ( module , exports , __webpack_require__ ) {
2447
2447
2448
- /* WEBPACK VAR INJECTION */ ( function ( global ) {
2448
+ /* WEBPACK VAR INJECTION */ ( function ( global ) { /* global Blob File */
2449
+
2449
2450
/*
2450
2451
* Module requirements.
2451
2452
*/
@@ -2461,48 +2462,46 @@ return /******/ (function(modules) { // webpackBootstrap
2461
2462
/**
2462
2463
* Checks for binary data.
2463
2464
*
2464
- * Right now only Buffer and ArrayBuffer are supported. .
2465
+ * Supports Buffer, ArrayBuffer, Blob and File .
2465
2466
*
2466
2467
* @param {Object } anything
2467
2468
* @api public
2468
2469
*/
2469
2470
2470
- function hasBinary ( data ) {
2471
-
2472
- function _hasBinary ( obj ) {
2473
- if ( ! obj ) return false ;
2471
+ function hasBinary ( obj ) {
2472
+ if ( ! obj || typeof obj !== 'object' ) {
2473
+ return false ;
2474
+ }
2474
2475
2475
- if ( ( global . Buffer && global . Buffer . isBuffer && global . Buffer . isBuffer ( obj ) ) ||
2476
- ( global . ArrayBuffer && obj instanceof ArrayBuffer ) ||
2477
- ( global . Blob && obj instanceof Blob ) ||
2478
- ( global . File && obj instanceof File )
2479
- ) {
2480
- return true ;
2476
+ if ( isArray ( obj ) ) {
2477
+ for ( var i = 0 , l = obj . length ; i < l ; i ++ ) {
2478
+ if ( hasBinary ( obj [ i ] ) ) {
2479
+ return true ;
2480
+ }
2481
2481
}
2482
+ return false ;
2483
+ }
2482
2484
2483
- if ( isArray ( obj ) ) {
2484
- for ( var i = 0 ; i < obj . length ; i ++ ) {
2485
- if ( _hasBinary ( obj [ i ] ) ) {
2486
- return true ;
2487
- }
2488
- }
2489
- } else if ( obj && 'object' == typeof obj ) {
2490
- // see: https://github.com/Automattic/has-binary/pull/4
2491
- if ( obj . toJSON && 'function' == typeof obj . toJSON ) {
2492
- obj = obj . toJSON ( ) ;
2493
- }
2485
+ if ( ( typeof global . Buffer === 'function' && global . Buffer . isBuffer && global . Buffer . isBuffer ( obj ) ) ||
2486
+ ( typeof global . ArrayBuffer === 'function' && obj instanceof ArrayBuffer ) ||
2487
+ ( typeof global . Blob === 'function' && obj instanceof Blob ) ||
2488
+ ( typeof global . File === 'function' && obj instanceof File )
2489
+ ) {
2490
+ return true ;
2491
+ }
2494
2492
2495
- for ( var key in obj ) {
2496
- if ( Object . prototype . hasOwnProperty . call ( obj , key ) && _hasBinary ( obj [ key ] ) ) {
2497
- return true ;
2498
- }
2499
- }
2500
- }
2493
+ // see: https://github.com/Automattic/has-binary/pull/4
2494
+ if ( obj . toJSON && typeof obj . toJSON === 'function' && arguments . length === 1 ) {
2495
+ return hasBinary ( obj . toJSON ( ) , true ) ;
2496
+ }
2501
2497
2502
- return false ;
2498
+ for ( var key in obj ) {
2499
+ if ( Object . prototype . hasOwnProperty . call ( obj , key ) && hasBinary ( obj [ key ] ) ) {
2500
+ return true ;
2501
+ }
2503
2502
}
2504
2503
2505
- return _hasBinary ( data ) ;
2504
+ return false ;
2506
2505
}
2507
2506
2508
2507
/* WEBPACK VAR INJECTION */ } . call ( exports , ( function ( ) { return this ; } ( ) ) ) )
@@ -2511,8 +2510,10 @@ return /******/ (function(modules) { // webpackBootstrap
2511
2510
/* 12 */
2512
2511
/***/ function ( module , exports ) {
2513
2512
2513
+ var toString = { } . toString ;
2514
+
2514
2515
module . exports = Array . isArray || function ( arr ) {
2515
- return Object . prototype . toString . call ( arr ) == '[object Array]' ;
2516
+ return toString . call ( arr ) == '[object Array]' ;
2516
2517
} ;
2517
2518
2518
2519
0 commit comments