Chore: even faster reject domainset builder

This commit is contained in:
SukkaW
2022-07-05 00:39:30 +08:00
parent 6c7317108b
commit 7ae9170b4d
2 changed files with 14 additions and 13 deletions

View File

@@ -10,8 +10,8 @@ exports.dedupe = ({ chunk }) => {
if (domainFromFullSet.charAt(0) !== '.') continue;
if (
// `.${domainFromInput}` === domainFromFullSet
domainFromInput.endsWith(domainFromFullSet)
(domainFromInput.charAt(0) !== '.' && `.${domainFromInput}` === domainFromFullSet)
|| domainFromInput.endsWith(domainFromFullSet)
) {
outputToBeRemoved.add(domainFromInput);
break;