Add a capitalize utility function.
This commit is contained in:
parent
26568b33de
commit
6f256e44fc
|
@ -25,3 +25,10 @@ export async function hashSha256(input: string): Promise<string> {
|
||||||
.map((byte) => byte.toString(16).padStart(2, "0"))
|
.map((byte) => byte.toString(16).padStart(2, "0"))
|
||||||
.join("");
|
.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Capitalize the input string by making the first character in it uppercase.
|
||||||
|
*/
|
||||||
|
export function capitalize(input: string): string {
|
||||||
|
return input[0].toUpperCase() + input.slice(1);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue