text: const fs = require('fs');
  
  const readFiles = async (fileToExtractUrls, fileToIgnoreUrls = null) => {
    const urlRegex = /(((http|https):\/\/)|(www\.))([\w+\-&@`~#$%^*.=\/?:]+)/gi;
  
    const protocolRegex = /^www(.+)/gi;
  
    let urlList = [];
  
    const data = await fs.promises.readFile(fileToExtractUrls, 'utf8');
  
    urlList = data.toLowerCase().match(urlRegex);
    urlList = Array.from(new Set(urlList));
  
    if (fileToIgnoreUrls) {
      let urlsToIgnore = await fs.promises.readFile(fileToIgnoreUrls, 'utf-8');
  
      const regexIgnoreUrls = /^(https:\/\/|http:\/\/|#)([\w+\-&@`~#$%^*.=\/?: ]*)/im;
  
      urlsToIgnore = urlsToIgnore.split('\n');
  
      let validFile = 0;
      let listToIgnore = [];
  
      urlsToIgnore.forEach((line) => {
        validFile = regexIgnoreUrls.test(line) ? validFile : ++validFile;
        line.toLowerCase();
        // eslint-disable-next-line no-unused-expressions
        line.match(urlRegex) ? listToIgnore.push(line) : null;
      });
  
      if (validFile !== 0) throw new Error('Invalid Ignore file.');
      listToIgnore = Array.from(new Set(listToIgnore));
  
      console.log('This example is different! not so much');
  
      console.log('The result is displayed in the Command Line Interface'); 
      urlList = urlList.reduce((finalUrls, url) => {
        // eslint-disable-next-line no-param-reassign
        if (protocolRegex.test(url)) url = `https://${url}`;
        if (!listToIgnore.some((ignoreUrl) => url.includes(ignoreUrl))) finalUrls.push(url);
        return finalUrls;
      }, []);
    }
    return urlList;
  };
  
  module.exports = {
    readFiles,
  };
  
  const someFunc = () => {
    console.log("to say something");
  }
  const thoseFunc = () => {
    console.log("to say something or nothing");
  }