src/download.js
Function download
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function download(link, callback) {
log(`download file ${link}`);
const filename = unescape(url.parse(link).pathname.split('/').pop());
const file = `${process.cwd()}/${filename}`;