INNER CODE UNIT · JavaScript
unixFilePaths
imagemin/imagemin · index.js:53
const unixFilePaths = input.map(path => convertToUnixPath(path));
const filePaths = glob ? await globby(unixFilePaths, {onlyFiles: true}) : input;
return Promise.all(
filePaths
.filter(filePath => isNotJunk(path.basename(filePath)))
.map(async filePath => {
try {
return await handleFile(filePath, options);
} catch (error) {
error.message = `Error occurred when handling file: ${input}\n\n${error.stack}`;
throw error;
}
}),
);
}
imagemin.buffer = async (data, {plugins = []} = {}) => {