| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d70824f commit b6f74b0
1 file 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, | |
@@ -786,7 +787,9 @@ function createConvenienceMethod(ctor, sync) { | |||
| 786 | 787 | ||
| 787 | 788 | const kMaxBrotliParam = MathMax(...ArrayPrototypeMap( | |
| 788 | 789 | ObjectKeys(constants), | |
| 789 | - (key) => (key.startsWith('BROTLI_PARAM_') ? constants[key] : 0) | ||
| 790 | + (key) => (StringPrototypeStartsWith(key, 'BROTLI_PARAM_') ? | ||
| 791 | + constants[key] : | ||
| 792 | + 0) | ||
| 790 | 793 | )); | |
| 791 | 794 | ||
| 792 | 795 | const brotliInitParamsArray = new Uint32Array(kMaxBrotliParam + 1); | |
@@ -927,7 +930,7 @@ ObjectDefineProperties(module.exports, { | |||
| 927 | 930 | // These should be considered deprecated | |
| 928 | 931 | // expose all the zlib constants | |
| 929 | 932 | for (const bkey of ObjectKeys(constants)) { | |
| 930 | - if (bkey.startsWith('BROTLI')) continue; | ||
| 933 | + if (StringPrototypeStartsWith(bkey, 'BROTLI')) continue; | ||
| 931 | 934 | ObjectDefineProperty(module.exports, bkey, { | |
| 932 | 935 | enumerable: false, value: constants[bkey], writable: false | |
| 933 | 936 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments