File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,11 @@ function calculateElement(
8383 return ( name != null ? Buffer . byteLength ( name , 'utf8' ) + 1 : 0 ) + ( 12 + 1 ) ;
8484 } else if ( value instanceof Date || isDate ( value ) ) {
8585 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+ ) {
8791 return (
8892 ( name != null ? Buffer . byteLength ( name , 'utf8' ) + 1 : 0 ) + ( 1 + 4 + 1 ) + value . byteLength
8993 ) ;
@@ -185,10 +189,7 @@ function calculateElement(
185189 }
186190 case 'function' :
187191 // 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]' ) {
192193 return (
193194 ( name != null ? Buffer . byteLength ( name , 'utf8' ) + 1 : 0 ) +
194195 1 +
Original file line number Diff line number Diff line change @@ -64,7 +64,8 @@ export const randomBytes = detectRandomBytes();
6464
6565export function isAnyArrayBuffer ( value : unknown ) : value is ArrayBuffer {
6666 return [ '[object ArrayBuffer]' , '[object SharedArrayBuffer]' ] . includes (
67- Object . prototype . toString . call ( value ) ) ;
67+ Object . prototype . toString . call ( value )
68+ ) ;
6869}
6970
7071export function isUint8Array ( value : unknown ) : value is Uint8Array {
You can’t perform that action at this time.
0 commit comments