mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
perf(web): optimize byteLowerCase() (#12282)
This commit is contained in:
parent
871dbb9f30
commit
864bf630ff
1 changed files with 3 additions and 7 deletions
|
@ -157,13 +157,9 @@
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
function byteLowerCase(s) {
|
function byteLowerCase(s) {
|
||||||
return StringPrototypeReplace(
|
// NOTE: correct since all callers convert to ByteString first
|
||||||
String(s),
|
// TODO(@AaronO): maybe prefer a ByteString_Lower webidl converter
|
||||||
/[A-Z]/g,
|
return StringPrototypeToLowerCase(s);
|
||||||
function byteUpperCaseReplace(c) {
|
|
||||||
return StringPrototypeToLowerCase(c);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue