Use stream in build tools

This commit is contained in:
SukkaW
2023-08-07 21:06:07 +08:00
parent dc96df313b
commit 82519839f8
6 changed files with 72 additions and 79 deletions

View File

@@ -209,7 +209,7 @@ const domainSuffixSet = new Set();
};
const sortedDomainSets = dudupedDominArray
.map((v) => {
const domain = getDomain(v.charCodeAt(0) === 46 ? v.slice(1) : v) || v;
const domain = getDomain(v[0] === '.' ? v.slice(1) : v) || v;
rejectDomainsStats[domain] = (rejectDomainsStats[domain] || 0) + 1;
return { v, domain };
})