Skip to content

Instantly share code, notes, and snippets.

@trigun0x2
Created October 24, 2019 22:12
Show Gist options
  • Save trigun0x2/00b52b0b60e3ef589228c05b73b0bf5a to your computer and use it in GitHub Desktop.
Save trigun0x2/00b52b0b60e3ef589228c05b73b0bf5a to your computer and use it in GitHub Desktop.
champs.forEach((champ) => {
fs.copyFile(`league-imgs/${champ.image.split('.')[0]}_0.jpg`, `leagueRenamed/${champ.id}.jpg`, (err) => {
if (err) throw err;
console.log(`${champ.name} was copied`);
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment