summaryrefslogtreecommitdiff
path: root/ext/http/01_http.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-05-01 22:30:02 +0900
committerGitHub <noreply@github.com>2023-05-01 15:30:02 +0200
commit6728ad4203d731e555dabf89ec6157f113454ce6 (patch)
tree956dc2d403b5a6ef107c35cab1ccc259ad4d86a1 /ext/http/01_http.js
parent94a148cdb6f7660518c75a3c20109bf64848f0f1 (diff)
fix(core): Use primordials for methods (#18839)
I would like to get this change into Deno before merging https://github.com/denoland/deno_lint/pull/1152
Diffstat (limited to 'ext/http/01_http.js')
-rw-r--r--ext/http/01_http.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/http/01_http.js b/ext/http/01_http.js
index 0048eedeb..f41a2beed 100644
--- a/ext/http/01_http.js
+++ b/ext/http/01_http.js
@@ -54,8 +54,9 @@ const {
SetPrototypeDelete,
StringPrototypeCharCodeAt,
StringPrototypeIncludes,
- StringPrototypeToLowerCase,
StringPrototypeSplit,
+ StringPrototypeToLowerCase,
+ StringPrototypeToUpperCase,
Symbol,
SymbolAsyncIterator,
TypeError,
@@ -497,17 +498,20 @@ function buildCaseInsensitiveCommaValueFinder(checkText) {
StringPrototypeToLowerCase(checkText),
"",
),
- (c) => [c.charCodeAt(0), c.toUpperCase().charCodeAt(0)],
+ (c) => [
+ StringPrototypeCharCodeAt(c, 0),
+ StringPrototypeCharCodeAt(StringPrototypeToUpperCase(c), 0),
+ ],
);
/** @type {number} */
let i;
/** @type {number} */
let char;
- /** @param value {string} */
+ /** @param {string} value */
return function (value) {
for (i = 0; i < value.length; i++) {
- char = value.charCodeAt(i);
+ char = StringPrototypeCharCodeAt(value, i);
skipWhitespace(value);
if (hasWord(value)) {