File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 22
22
"boolean" : " 3.2.0" ,
23
23
"console-polyfill" : " 0.3.0" ,
24
24
"format-specifiers" : " ^1.0.0" ,
25
+ "is-buffer" : " ^2.0.5" ,
25
26
"is-symbol" : " ^1.0.4" ,
26
27
"iserror" : " 0.0.2" ,
27
28
"merge-options" : " 3.0.4" ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const formatSpecifiers = require('format-specifiers');
8
8
const get = require ( '@strikeentco/get' ) ;
9
9
const isError = require ( 'iserror' ) ;
10
10
const isSymbol = require ( 'is-symbol' ) ;
11
+ const isBuffer = require ( 'is-buffer' ) ;
11
12
const mergeOptions = require ( 'merge-options' ) ;
12
13
const pMapSeries = require ( 'p-map-series' ) ;
13
14
const parseAppInfo = require ( 'parse-app-info' ) ;
@@ -50,8 +51,11 @@ function dotifyToArray(obj) {
50
51
const res = [ ] ;
51
52
function recurse ( obj , current ) {
52
53
// if it's a buffer, uint8array, or array
53
- // eslint-disable-next-line n/prefer-global/buffer
54
- if ( Buffer . isBuffer ( obj ) || obj instanceof Uint8Array || Array . isArray ( obj ) )
54
+ if (
55
+ isBuffer ( obj ) ||
56
+ ( obj . constructor && obj . constructor . name === 'Uint8Array' ) ||
57
+ Array . isArray ( obj )
58
+ )
55
59
return ;
56
60
57
61
for ( const key of Reflect . ownKeys ( obj ) ) {
You can’t perform that action at this time.
0 commit comments