perf: replace String and Array indexOf method calls with includes method call (#55482)

This commit is contained in:
Sampo Kivistö
2023-08-25 21:27:55 +03:00
committed by GitHub
parent c3c5abb3a7
commit ec2bd4e252
46 changed files with 98 additions and 124 deletions

View File

@@ -71,7 +71,7 @@ async function checkSourceFiles() {
let count = 0;
console.log("== List of errors not used in source ==");
for (const errName of errorNames) {
if (allSrc.indexOf(errName) < 0) {
if (!allSrc.includes(errName)) {
console.log(errName);
count++;
}