MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / normalizeWhitespace

Function normalizeWhitespace

packages/sql/src/schema/partitioning.ts:55–55  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

53const collapseWhitespace = (value: string): string => value.replace(/\s+/g, ' ');
54
55const normalizeWhitespace = (value: string): string => mapOutsideLiterals(value, collapseWhitespace).trim();
56
57const stripDoubleQuotes = (value: string): string => mapOutsideLiterals(value, s => s.replaceAll('"', ''));
58

Callers 7

normalizePartitionBoundFunction · 0.85
toEntityPartitionByFunction · 0.85

Calls 1

mapOutsideLiteralsFunction · 0.85

Tested by

no test coverage detected