Skip to content

startsWith<N>(name, prefix): StartsWithNode<{ name: N; type: "str"; }>

Defined in: src/query/expression.ts:409

Attribute is a str beginning with this prefix.

The match is on raw UTF-8 bytes with no normalization — it is the index encoding, so startsWith("name", "é") matches only the same byte sequence, not another normal form of it.

N extends string

N

The prefix, as a bare string or a str value.

string | StrValue

StartsWithNode<{ name: N; type: "str"; }>

If the name is outside the attribute name grammar.

If the name starts with $ but is not a queryable system attribute.

If given a value that is not a str, or a system attribute (none of which is a str).

startsWith("desc", "ab") // desc STARTSWITH str('ab')