code: function filter_and_recursion_processing(file) {
      const filePath = path.join(...basePath, ...directoryPath, file);
  
      if (path.extname(file) === extension) {
        // partial file is found, passing through filter, process it later
        return file;
      } else if (fs.statSync(filePath).isDirectory()) {
        // directory found, do recursion and get processed partials back
        partials = partials.concat(
          getPartials({
            basePath,
            directoryPath: [...directoryPath, file],
            extension,
            encoding,
            getNameFunc
          })
        );
      }
  
      return false;
    }
docs: for easier reading as function: process directory tree recursively