Why value cannot be sent as a token, or undefined when it can. A token is a value compared
exactly: here the state and type slugs. The rules apply to the value with surrounding
whitespace trimmed, as it is sent (normalizeToken): not blank (and not only invisible
characters or combining marks), no lone surrogate, and no control or format character at all
(a zero-width space, ZWJ, a soft hyphen, a bidi control), since an invisible character in a slug
only ever makes it unknown. The reason quotes the value visibly. A slug is then checked against
the known list (isStateSlug, isTypeSlug).
Why
valuecannot be sent as a token, or undefined when it can. A token is a value compared exactly: here thestateandtypeslugs. The rules apply to the value with surrounding whitespace trimmed, as it is sent (normalizeToken): not blank (and not only invisible characters or combining marks), no lone surrogate, and no control or format character at all (a zero-width space, ZWJ, a soft hyphen, a bidi control), since an invisible character in a slug only ever makes it unknown. The reason quotes the value visibly. A slug is then checked against the known list (isStateSlug,isTypeSlug).