MCPcopy
hub / github.com/webpack/webpack / labeledArgs

Function labeledArgs

lib/logging/createConsoleLogger.js:113–121  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111 * @returns {[string?, ...T[]]} labeled args
112 */
113 const labeledArgs = () => {
114 if (Array.isArray(args)) {
115 if (args.length > 0 && typeof args[0] === "string") {
116 return [`[${name}] ${args[0]}`, ...args.slice(1)];
117 }
118 return [`[${name}]`, ...args];
119 }
120 return [];
121 };
122 const debug = debugFilters.some((f) => f(name));
123 switch (type) {
124 case LogType.debug:

Callers 1

loggerFunction · 0.85

Calls 2

isArrayMethod · 0.80
sliceMethod · 0.80

Tested by

no test coverage detected