MCPcopy Index your code
hub / github.com/nodejs/node / isNameOnlyKey

Function isNameOnlyKey

deps/npm/lib/utils/allow-scripts-writer.js:124–140  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

122}
123
124const isNameOnlyKey = (key) => {
125 try {
126 const parsed = npa(key)
127 if (parsed.type === 'tag') {
128 return true
129 }
130 if (parsed.type === 'range') {
131 return parsed.fetchSpec === '*'
132 || parsed.rawSpec === ''
133 || parsed.rawSpec === '*'
134 }
135 return false
136 } catch {
137 /* istanbul ignore next: keys reaching this helper have already parsed via keyTargetsNode */
138 return false
139 }
140}
141
142// Does this policy key target this node by identity (ignoring the
143// allow/deny value)?

Callers 1

denyWarningFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…