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

Function outputError

deps/npm/lib/utils/output-error.js:3–14  ·  view source on GitHub ↗
({ standard = [], verbose = [], error = [], summary = [], detail = [] })

Source from the content-addressed store, hash-verified

1const { log, output } = require('proc-log')
2
3const outputError = ({ standard = [], verbose = [], error = [], summary = [], detail = [] }) => {
4 for (const line of standard) {
5 // Each output line is just a single string
6 output.standard(line)
7 }
8 for (const line of verbose) {
9 log.verbose(...line)
10 }
11 for (const line of [...error, ...summary, ...detail]) {
12 log.error(...line)
13 }
14}
15
16const jsonError = (error, npm) => {
17 if (error && npm?.loaded && npm?.config.get('json')) {

Callers 3

#getErrorMethod · 0.85
execWorkspacesMethod · 0.85
execWorkspacesMethod · 0.85

Calls 2

verboseMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…