(input: string)
| 168 | * e.g. "some_example_string" returns a "Some example string". |
| 169 | */ |
| 170 | export function snakeToSentenceCase(input: string): string { |
| 171 | return input |
| 172 | .split("_") |
| 173 | .map((word, index) => |
| 174 | index === 0 ? capitalizeSentence(word, false) : word.toLowerCase(), |
| 175 | ) |
| 176 | .join(" "); |
| 177 | } |
| 178 | |
| 179 | /** Constrains a given number to a min and max. */ |
| 180 | export function clamp(value: number, min: number, max: number) { |
no test coverage detected