Skip to content

string

string

Functions

humanize()

function humanize(str): string;

Defined in: string/index.ts:10

Parameters

Parameter Type
str string

Returns

string


literalIlikeContainsPattern()

function literalIlikeContainsPattern(value): string | undefined;

Defined in: string/index.ts:80

Build a literal PostgreSQL ILIKE contains pattern.

PostgreSQL treats \\, %, and _ specially in LIKE patterns, so escape them before adding the two intentional contains wildcards.

Parameters

Parameter Type
value string

Returns

string | undefined


normalizeSearchTerm()

function normalizeSearchTerm(value): string;

Defined in: string/index.ts:23

Canonical user-entered search text shared by UI and server query handlers.

Parameters

Parameter Type
value string

Returns

string


textSearchMatches()

function textSearchMatches(value, search): boolean;

Defined in: string/index.ts:60

Literal contains search with bounded typo tolerance for human-entered text.

Parameters

Parameter Type
value string
search string

Returns

boolean