MCPcopy Create free account
hub / github.com/TanStack/db / camelToSnake

Function camelToSnake

packages/electric-db-collection/tests/sql-compiler.test.ts:362–363  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

360 describe(`column name encoding (camelCase to snake_case)`, () => {
361 // Helper to simulate snakeCamelMapper's encode function
362 const camelToSnake = (str: string): string =>
363 str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`)
364
365 it(`should encode column names in where clause when encoder is provided`, () => {
366 const result = compileSQL(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected