From 39dd3a3d0f15d56de19dac9edfb79168b8f7fa35 Mon Sep 17 00:00:00 2001 From: Norbert Date: Fri, 30 Jun 2023 07:53:13 +0200 Subject: [PATCH] console log whitelist: ${domain} - removing --- cf_list_create.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cf_list_create.js b/cf_list_create.js index af80e41..dd77c19 100644 --- a/cf_list_create.js +++ b/cf_list_create.js @@ -90,7 +90,11 @@ fs.readFile('input.csv', 'utf8', async (err, data) => { // Remove domains from the domains array that are present in the whitelist array domains = domains.filter(domain => { - return !whitelist.includes(domain); + if (whitelist.includes(domain)) { + console.warn(`Domain found in the whitelist: ${domain} - removing`); + return false; + } + return true; }); // Trim array to 300,000 domains if it's longer than that