文件操作 - nerf-dart.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/node_modules/npm/node_modules/@npmcli/config/lib/nerf-dart.js
编辑文件内容
const { URL } = require('node:url') /** * Maps a URL to an identifier. * * Name courtesy schiffertronix media LLC, a New Jersey corporation * * @param {String} uri The URL to be nerfed. * * @returns {String} A nerfed URL. */ module.exports = (url) => { const parsed = new URL(url) const from = `${parsed.protocol}//${parsed.host}${parsed.pathname}` const rel = new URL('.', from) const res = `//${rel.host}${rel.pathname}` return res }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件