function capitalize(str: string, i: number): string { if (i === 0) { return str; } return str[0].toUpperCase() + str.slice(1); }