normalizeSelectKey
The stored form of a user-created select value: trimmed, lower-cased, every run of whitespace collapsed to a single `-`.
The stored form of a user-created select value: trimmed, lower-cased, every run
of whitespace collapsed to a single -. Case and spacing only — punctuation is
left alone. Idempotent, which is what makes normalizeSelectKey(k) === k a
usable stability check on an authored key.
Import from @homepages/template-kit.
Signature
Section titled “Signature”function normalizeSelectKey(text: string): stringParameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
text |
string |
required |
Returns
Section titled “Returns”string