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

Function flattenIssuePath

packages/core/src/integrations/zoderrors.ts:93–103  ·  view source on GitHub ↗
(path: Array<string | number>)

Source from the content-addressed store, hash-verified

91 * flattenIssuePath([0, 'foo', 1, 'bar']) // -> '<array>.foo.<array>.bar'
92 */
93export function flattenIssuePath(path: Array<string | number>): string {
94 return path
95 .map(p => {
96 if (typeof p === 'number') {
97 return '<array>';
98 } else {
99 return p;
100 }
101 })
102 .join('.');
103}
104
105/**
106 * Zod error message is a stringified version of ZodError.issues

Callers 2

zoderrrors.test.tsFile · 0.90
formatIssueMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected