MCPcopy Create free account
hub / github.com/npm/cli / add

Function add

workspaces/arborist/lib/script-allowed.js:105–111  ·  view source on GitHub ↗
(spec)

Source from the content-addressed store, hash-verified

103 const specs = []
104 const seen = new Set()
105 const add = (spec) => {
106 if (typeof spec !== 'string' || spec === '' || seen.has(spec)) {
107 return
108 }
109 seen.add(spec)
110 specs.push(spec)
111 }
112
113 add(node?.resolved)
114

Callers 2

resolvedSourceSpecsFunction · 0.70
add-rm-pkg-deps.jsFile · 0.50

Calls 3

pushMethod · 0.80
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected