File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ const {
37
37
ObjectKeys,
38
38
ObjectSetPrototypeOf,
39
39
ReflectApply,
40
+ StringPrototypeStartsWith,
40
41
Symbol,
41
42
TypedArrayPrototypeFill,
42
43
Uint32Array,
@@ -781,7 +782,9 @@ function createConvenienceMethod(ctor, sync) {
781
782
782
783
const kMaxBrotliParam = MathMax ( ...ArrayPrototypeMap (
783
784
ObjectKeys ( constants ) ,
784
- ( key ) => ( key . startsWith ( 'BROTLI_PARAM_' ) ? constants [ key ] : 0 )
785
+ ( key ) => ( StringPrototypeStartsWith ( key , 'BROTLI_PARAM_' ) ?
786
+ constants [ key ] :
787
+ 0 )
785
788
) ) ;
786
789
787
790
const brotliInitParamsArray = new Uint32Array ( kMaxBrotliParam + 1 ) ;
@@ -922,7 +925,7 @@ ObjectDefineProperties(module.exports, {
922
925
// These should be considered deprecated
923
926
// expose all the zlib constants
924
927
for ( const bkey of ObjectKeys ( constants ) ) {
925
- if ( bkey . startsWith ( 'BROTLI' ) ) continue ;
928
+ if ( StringPrototypeStartsWith ( bkey , 'BROTLI' ) ) continue ;
926
929
ObjectDefineProperty ( module . exports , bkey , {
927
930
enumerable : false , value : constants [ bkey ] , writable : false
928
931
} ) ;
You can’t perform that action at this time.
0 commit comments