MCPcopy Index your code
hub / github.com/simstudioai/sim / bareName

Function bareName

scripts/check-migrations-safety.ts:51–55  ·  view source on GitHub ↗

Strip quotes and any schema prefix so `"public"."user"` and `"user"` match.

(raw: string)

Source from the content-addressed store, hash-verified

49
50/** Strip quotes and any schema prefix so `"public"."user"` and `"user"` match. */
51function bareName(raw: string): string {
52 const unquoted = raw.replace(/"/g, '')
53 const parts = unquoted.split('.')
54 return (parts[parts.length - 1] ?? unquoted).toLowerCase()
55}
56
57/**
58 * Split SQL into statements with their 1-based start line, respecting line

Callers 2

classifyFunction · 0.85
lintSqlFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected