diff --git a/lib/_http_agent.js b/lib/_http_agent.js index e23409f2ee797f..a4829526f6e138 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -38,7 +38,7 @@ const { StringPrototypeIndexOf, StringPrototypeSplit, StringPrototypeStartsWith, - StringPrototypeSubstr, + StringPrototypeSubstring, Symbol, } = primordials; @@ -363,7 +363,7 @@ function calculateServerName(options, req) { // Leading '[', but no ']'. Need to do something... servername = hostHeader; } else { - servername = StringPrototypeSubstr(hostHeader, 1, index - 1); + servername = StringPrototypeSubstring(hostHeader, 1, index); } } else { servername = StringPrototypeSplit(hostHeader, ':', 1)[0]; diff --git a/lib/internal/main/print_help.js b/lib/internal/main/print_help.js index edb861668cac3d..73227fbd9cb456 100644 --- a/lib/internal/main/print_help.js +++ b/lib/internal/main/print_help.js @@ -11,7 +11,7 @@ const { RegExpPrototypeSymbolReplace, StringPrototypeLocaleCompare, StringPrototypeSlice, - StringPrototypeTrimLeft, + StringPrototypeTrimStart, StringPrototypeRepeat, SafeMap, } = primordials; @@ -180,7 +180,7 @@ function format( else text += StringPrototypeRepeat(' ', firstColumn - displayName.length); - text += StringPrototypeTrimLeft( + text += StringPrototypeTrimStart( indent(fold(displayHelpText, secondColumn), firstColumn)) + '\n'; } diff --git a/lib/repl.js b/lib/repl.js index d8021215b3f425..3029c94b1e1ac0 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -90,7 +90,7 @@ const { StringPrototypeSplit, StringPrototypeStartsWith, StringPrototypeTrim, - StringPrototypeTrimLeft, + StringPrototypeTrimStart, StringPrototypeToLocaleLowerCase, Symbol, SyntaxError, @@ -1326,7 +1326,7 @@ function complete(line, callback) { let completeOn, group; // Ignore right whitespace. It could change the outcome. - line = StringPrototypeTrimLeft(line); + line = StringPrototypeTrimStart(line); let filter = '';