文件操作 - colors.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/node_modules/npm/node_modules/npm-audit-report/lib/colors.js
编辑文件内容
module.exports = (chalk) => { const green = s => chalk.green.bold(s) const red = s => chalk.red.bold(s) const magenta = s => chalk.magenta.bold(s) const yellow = s => chalk.yellow.bold(s) const white = s => chalk.bold(s) const severity = (sev, s) => sev.toLowerCase() === 'moderate' ? yellow(s || sev) : sev.toLowerCase() === 'high' ? red(s || sev) : sev.toLowerCase() === 'critical' ? magenta(s || sev) : white(s || sev) const dim = s => chalk.dim(s) return { dim, green, red, magenta, yellow, white, severity, } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件