Functions
capitalize
- capitalize(string: string): string
clamp
- clamp(val: number, min?: number, max?: number): number
Parameters
val: number
min: number = 0
max: number = 1
Returns number
format
- format(template: string, ...args: any[]): string
Parameters
template: string
Rest ...args: any[]
Returns string
mod
- mod(x: number, n: number): number
Format a string in a flexible way. Scans for %s strings and replaces them with arguments. List of patterns is modifiable via String.format.map.