Converts a string type from camelCase to kebab-case. Note this simply inserts hyphens before
uppercase letters and converts them to lowercase. It does not handle special cases like acronyms
or symbols. It can result in multiple hyphens in a row, leading hyphens, or trailing hyphens.
By using this as the type for a string parameter or string property, you can enforce (somewhat)
at compile time that the string is in kebab-case format assuming it is provided as a string
literal.
Converts a string type from camelCase to kebab-case. Note this simply inserts hyphens before uppercase letters and converts them to lowercase. It does not handle special cases like acronyms or symbols. It can result in multiple hyphens in a row, leading hyphens, or trailing hyphens.
By using this as the type for a string parameter or string property, you can enforce (somewhat) at compile time that the string is in kebab-case format assuming it is provided as a string literal.