Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function formatContentDisposition(path, stats) {
const filename = Path.basename(path);
const modified = stats.mtime.toUTCString();
return `attachment; filename="${filename}"; modification-date="${modified}"; size=${stats.size};`;
}