Appearance
Function: normalizeListValue()
ts
function normalizeListValue(
kind,
raw,
caseInsensitive?
):
| {
ok: true;
value: string;
}
| {
ok: false;
reason: string;
};Canonical form of an entry for a list kind, or an error message. Used by the API on write and by the lookup service on read so both sides agree on matching.
Parameters
kind
"string" | "number" | "country" | "email" | "ip_cidr"
raw
string
caseInsensitive?
boolean
Returns
| { ok: true; value: string; } | { ok: false; reason: string; }