redup(dir = '.') {
    if (!fs.existsSync(path.join(dir, '.redup.json'))) {
      return;
    }
    let config = JSON.parse(fs.readFileSync(path.join(dir, '.redup.json'), 'utf8'));
    Object.entries(config).forEach((file) => {
      let fileContent = fs.readFileSync(file[0]);
      file[1].forEach((removedFile) => {
        fs.writeFileSync(removedFile, fileContent);
      });
    });
    fs.unlinkSync(path.join(dir, '.redup.json'));
  }
/**
   * Rebuild the directory after deduping it
   * @param {string} dir The directory to rebuild
   */
Rebuild the directory after deduping it
@param {string} dir The directory to rebuild
Rebuild the directory after deduping it @param { string } dir The directory to rebuild
redup(dir = '.') {
    if (!fs.existsSync(path.join(dir, '.redup.json'))) {
      return;
    }
    let config = JSON.parse(fs.readFileSync(path.join(dir, '.redup.json'), 'utf8'));
    Object.entries(config).forEach((file) => {
      let fileContent = fs.readFileSync(file[0]);
      file[1].forEach((removedFile) => {
        fs.writeFileSync(removedFile, fileContent);
      });
    });
    fs.unlinkSync(path.join(dir, '.redup.json'));
  }
redup ( dir = '.' ) { if ( ! fs . existsSync ( path . join ( dir , '.redup.json' ) ) ) { return ; } let config = JSON . parse ( fs . readFileSync ( path . join ( dir , '.redup.json' ) , 'utf8' ) ) ; Object . entries ( config ) . forEach ( ( file ) => { let fileContent = fs . readFileSync ( file [ 0 ] ) ; file [ 1 ] . forEach ( ( removedFile ) => { fs . writeFileSync ( removedFile , fileContent ) ; } ) ; } ) ; fs . unlinkSync ( path . join ( dir , '.redup.json' ) ) ; }
Rebuild the directory after deduping it
 @param {string} dir The directory to rebuild
Rebuild the directory after deduping it @param { string } dir The directory to rebuild