MCPcopy Index your code
hub / github.com/CapSoftware/Cap / normalizeColumnDef

Function normalizeColumnDef

scripts/analytics/check-analytics.js:13–19  ·  view source on GitHub ↗
(definition)

Source from the content-addressed store, hash-verified

11} from "./shared.js";
12
13const normalizeColumnDef = (definition) =>
14 normalizeWhitespace(
15 definition
16 .replace(/`/g, "")
17 .replace(/\bjson:\$[^\s,)]+/gi, "")
18 .replace(/\bdefault\s+(?:'[^']*'|"[^"]*"|[^\s,)]+)/gi, ""),
19 ).toLowerCase();
20
21const buildExpectedSchema = (table) =>
22 buildSchemaLines(table).map((column) => normalizeColumnDef(column));

Callers 1

buildExpectedSchemaFunction · 0.85

Calls 1

normalizeWhitespaceFunction · 0.90

Tested by

no test coverage detected