文件操作 - index.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/node_modules/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js
编辑文件内容
import ansiRegex from 'ansi-regex'; const regex = ansiRegex(); export default function stripAnsi(string) { if (typeof string !== 'string') { throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); } // Even though the regex is global, we don't need to reset the `.lastIndex` // because unlike `.exec()` and `.test()`, `.replace()` does it automatically // and doing it manually has a performance penalty. return string.replace(regex, ''); }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件