文件操作 - removeMaybeImportAttributes.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/sucrase/dist/esm/util/removeMaybeImportAttributes.js
编辑文件内容
import {ContextualKeyword} from "../parser/tokenizer/keywords"; import {TokenType as tt} from "../parser/tokenizer/types"; /** * Starting at a potential `with` or (legacy) `assert` token, remove the import * attributes if they exist. */ export function removeMaybeImportAttributes(tokens) { if ( tokens.matches2(tt._with, tt.braceL) || (tokens.matches2(tt.name, tt.braceL) && tokens.matchesContextual(ContextualKeyword._assert)) ) { // assert tokens.removeToken(); // { tokens.removeToken(); tokens.removeBalancedCode(); // } tokens.removeToken(); } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件