MCPcopy Create free account
hub / github.com/nodejs/node / isGitNode

Function isGitNode

deps/npm/lib/commands/ls.js:226–237  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

224module.exports = LS
225
226const isGitNode = (node) => {
227 if (!node.resolved) {
228 return
229 }
230
231 try {
232 const { type } = npa(node.resolved)
233 return type === 'git' || type === 'hosted'
234 } catch {
235 return false
236 }
237}
238
239const isOptional = (node) =>
240 node[_type] === 'optional' || node[_type] === 'peerOptional'

Callers 1

getHumanOutputItemFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected