Skip to main content

escapeSingleQuotedString()

escapeSingleQuotedString<S extends string | null | undefined>(s: S): S

Defined in: packages/core/src/utils/formatQuery/utils.ts:323

Escapes backslashes and single quotes for embedding in a single-quoted string literal (Gremlin/Groovy, Painless, JS). Used for field names (property keys, doc['…']).

Type Parameters​

Type Parameter
S extends string | null | undefined

Parameters​

ParameterType
sS

Returns​

S


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.