File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,11 @@ function calculateElement(
83
83
return ( name != null ? Buffer . byteLength ( name , 'utf8' ) + 1 : 0 ) + ( 12 + 1 ) ;
84
84
} else if ( value instanceof Date || isDate ( value ) ) {
85
85
return ( name != null ? Buffer . byteLength ( name , 'utf8' ) + 1 : 0 ) + ( 8 + 1 ) ;
86
- } else if ( ArrayBuffer . isView ( value ) || value instanceof ArrayBuffer || isAnyArrayBuffer ( value ) ) {
86
+ } else if (
87
+ ArrayBuffer . isView ( value ) ||
88
+ value instanceof ArrayBuffer ||
89
+ isAnyArrayBuffer ( value )
90
+ ) {
87
91
return (
88
92
( name != null ? Buffer . byteLength ( name , 'utf8' ) + 1 : 0 ) + ( 1 + 4 + 1 ) + value . byteLength
89
93
) ;
@@ -185,10 +189,7 @@ function calculateElement(
185
189
}
186
190
case 'function' :
187
191
// WTF for 0.4.X where typeof /someregexp/ === 'function'
188
- if (
189
- value instanceof RegExp || isRegExp ( value ) ||
190
- String . call ( value ) === '[object RegExp]'
191
- ) {
192
+ if ( value instanceof RegExp || isRegExp ( value ) || String . call ( value ) === '[object RegExp]' ) {
192
193
return (
193
194
( name != null ? Buffer . byteLength ( name , 'utf8' ) + 1 : 0 ) +
194
195
1 +
Original file line number Diff line number Diff line change @@ -64,7 +64,8 @@ export const randomBytes = detectRandomBytes();
64
64
65
65
export function isAnyArrayBuffer ( value : unknown ) : value is ArrayBuffer {
66
66
return [ '[object ArrayBuffer]' , '[object SharedArrayBuffer]' ] . includes (
67
- Object . prototype . toString . call ( value ) ) ;
67
+ Object . prototype . toString . call ( value )
68
+ ) ;
68
69
}
69
70
70
71
export function isUint8Array ( value : unknown ) : value is Uint8Array {
You can’t perform that action at this time.
0 commit comments