MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / formatConsoleArgs

Function formatConsoleArgs

packages/core/src/logs/utils.ts:19–23  ·  view source on GitHub ↗
(values: unknown[], normalizeDepth: number, normalizeMaxBreadth: number)

Source from the content-addressed store, hash-verified

17 * @returns The formatted string.
18 */
19export function formatConsoleArgs(values: unknown[], normalizeDepth: number, normalizeMaxBreadth: number): string {
20 return 'util' in GLOBAL_OBJ && typeof (GLOBAL_OBJ as GlobalObjectWithUtil).util.format === 'function'
21 ? (GLOBAL_OBJ as GlobalObjectWithUtil).util.format(...values)
22 : safeJoinConsoleArgs(values, normalizeDepth, normalizeMaxBreadth);
23}
24
25/**
26 * Joins the given values into a string.

Callers 3

setupFunction · 0.90
logFunction · 0.90
defaultExtractAttributesFunction · 0.90

Calls 2

safeJoinConsoleArgsFunction · 0.85
formatMethod · 0.80

Tested by

no test coverage detected