MCPcopy
hub / github.com/vitest-dev/vitest / replaceTrailingSpaces

Function replaceTrailingSpaces

packages/utils/src/diff/index.ts:427–429  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

425
426const SPACE_SYMBOL = '\u{00B7}' // middle dot
427function replaceTrailingSpaces(text: string): string {
428 return text.replace(/\s+$/gm, spaces => SPACE_SYMBOL.repeat(spaces.length))
429}
430
431function printReceived(object: unknown): string {
432 return c.red(replaceTrailingSpaces(stringify(object)))

Callers 2

printReceivedFunction · 0.70
printExpectedFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected