Skip to content

Commit

Permalink
chore: initialize function default
Browse files Browse the repository at this point in the history
  • Loading branch information
onedionys committed Mar 25, 2024
1 parent 2bbe7e9 commit 83657c6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Capitalizes the first letter of a string.
* @param str The input string.
* @returns The string with the first letter capitalized.
*/
export function capitalizeFirstLetter(str: string): string {
return str.charAt(0).toUpperCase() + str.slice(1);
}

/**
* Reverses a string.
* @param str The input string.
* @returns The reversed string.
*/
export function reverseString(str: string): string {
return str.split("").reverse().join("");
}

0 comments on commit 83657c6

Please sign in to comment.