🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-09 06:08:27 | PHP 8.2.33
📂
/ (Root)
/
opt
/
cpanel
/
ea-nodejs16
/
lib
/
node_modules
/
npm
/
node_modules
/
@npmcli
/
arborist
/
lib
📍 /opt/cpanel/ea-nodejs16/lib/node_modules/npm/node_modules/@npmcli/arborist/lib
🔄 Refresh
✏️
Editing: deepest-nesting-target.js
Read Only
// 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
💾 Save Changes
❌ Cancel