X7ROOT File Manager
Current Path:
/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/lib/install
opt
/
alt
/
alt-nodejs6
/
root
/
usr
/
lib
/
node_modules
/
npm
/
lib
/
install
/
ðŸ“
..
📄
access-error.js
(202 B)
ðŸ“
action
📄
actions.js
(4.97 KB)
📄
and-add-parent-to-errors.js
(324 B)
📄
and-finish-tracker.js
(360 B)
📄
and-ignore-errors.js
(204 B)
📄
build-path.js
(243 B)
📄
check-permissions.js
(1.85 KB)
📄
copy-tree.js
(625 B)
📄
decompose-actions.js
(1.54 KB)
📄
deps.js
(23.23 KB)
📄
diff-trees.js
(5.01 KB)
📄
exists.js
(775 B)
📄
filter-invalid-actions.js
(1 KB)
📄
flatten-tree.js
(1023 B)
📄
inflate-bundled.js
(492 B)
📄
inflate-shrinkwrap.js
(3.65 KB)
📄
is-dev-dep.js
(175 B)
📄
is-extraneous.js
(889 B)
📄
is-fs-access-available.js
(763 B)
📄
is-opt-dep.js
(185 B)
📄
is-prod-dep.js
(172 B)
📄
is-registry-specifier.js
(172 B)
📄
mutate-into-logical-tree.js
(4.22 KB)
📄
node.js
(1.43 KB)
📄
read-shrinkwrap.js
(884 B)
📄
realize-shrinkwrap-specifier.js
(661 B)
📄
report-optional-failure.js
(1.02 KB)
📄
save.js
(6.38 KB)
📄
update-package-json.js
(1.52 KB)
📄
validate-args.js
(1.82 KB)
📄
validate-tree.js
(2.55 KB)
📄
writable.js
(1 KB)
Editing: is-extraneous.js
'use strict' module.exports = isExtraneous function isExtraneous (tree) { var result = !isNotExtraneous(tree) return result } function isNotRequired (tree) { return tree.requiredBy && tree.requiredBy.length === 0 } function parentHasNoPjson (tree) { return tree.parent && tree.parent.isTop && tree.parent.error } function topHasNoPjson (tree) { var top = tree while (!top.isTop) top = top.parent return top.error } function isNotExtraneous (tree, isCycle) { if (!isCycle) isCycle = {} if (tree.isTop || tree.userRequired) { return true } else if (isNotRequired(tree) && parentHasNoPjson(tree)) { return true } else if (isCycle[tree.path]) { return topHasNoPjson(tree) } else { isCycle[tree.path] = true return tree.requiredBy && tree.requiredBy.some(function (node) { return isNotExtraneous(node, Object.create(isCycle)) }) } }
Upload File
Create Folder