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

Function parseableOutput

lib/commands/ls.js:556–572  ·  view source on GitHub ↗
({ global, long, seenNodes })

Source from the content-addressed store, hash-verified

554}
555
556const parseableOutput = ({ global, long, seenNodes }) => {
557 let out = ''
558 for (const node of seenNodes.values()) {
559 if (node.path && node[_include]) {
560 out += node.path
561 if (long) {
562 out += `:${node.pkgid}`
563 out += node.path !== node.realpath ? `:${node.realpath}` : ''
564 out += isExtraneous(node, { global }) ? ':EXTRANEOUS' : ''
565 out += node[_invalid] ? ':INVALID' : ''
566 out += node.overridden ? ':OVERRIDDEN' : ''
567 }
568 out += '\n'
569 }
570 }
571 return out.trim()
572}

Callers 1

execMethod · 0.85

Calls 1

isExtraneousFunction · 0.85

Tested by

no test coverage detected