文件操作 - removeXMLNS.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/svgo/plugins/removeXMLNS.js
编辑文件内容
'use strict'; exports.name = 'removeXMLNS'; exports.description = 'removes xmlns attribute (for inline svg, disabled by default)'; /** * Remove the xmlns attribute when present. * * @example * <svg viewBox="0 0 100 50" xmlns="http://www.w3.org/2000/svg"> * ↓ * <svg viewBox="0 0 100 50"> * * @author Ricardo Tomasi * * @type {import('./plugins-types').Plugin<'removeXMLNS'>} */ exports.fn = () => { return { element: { enter: (node) => { if (node.name === 'svg') { delete node.attributes.xmlns; } }, }, }; };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件