Skip to content

Commit b1c1ddf

Browse files
RafaelGSSbrunocroh
authored andcommitted
lib: optimize styleText when validateStream is false
This commit optimizes the util.styleText when validateStream is false Co-Authored-By: Bruno Rodrigues <swe@brunocroh.com> Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: #61792 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
1 parent 2c94967 commit b1c1ddf

2 files changed

Lines changed: 82 additions & 67 deletions

File tree

lib/util.js

Lines changed: 80 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const {
2525
ArrayIsArray,
2626
ArrayPrototypePop,
2727
ArrayPrototypePush,
28-
ArrayPrototypeReduce,
2928
Error,
3029
ErrorCaptureStackTrace,
3130
FunctionPrototypeBind,
@@ -37,8 +36,6 @@ const {
3736
ObjectSetPrototypeOf,
3837
ObjectValues,
3938
ReflectApply,
40-
RegExp,
41-
RegExpPrototypeSymbolReplace,
4239
StringPrototypeToWellFormed,
4340
} = primordials;
4441

@@ -104,13 +101,58 @@ function lazyAbortController() {
104101

105102