文件操作 - deepest-nesting-target.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/deepest-nesting-target.js
编辑文件内容
// given a starting node, what is the *deepest* target where name could go? // This is not on the Node class for the simple reason that we sometimes // need to check the deepest *potential* target for a Node that is not yet // added to the tree where we are checking. const deepestNestingTarget = (start, name) => { for (const target of start.ancestry()) { // note: this will skip past the first target if edge is peer if (target.isProjectRoot || !target.resolveParent || target.globalTop) { return target } const targetEdge = target.edgesOut.get(name) if (!targetEdge || !targetEdge.peer) { return target } } } module.exports = deepestNestingTarget
修改文件时间
将文件时间修改为当前时间的前一年
删除文件