- Add JSDoc and use css varialble for pixels

This commit is contained in:
Shemy Gan committed 2024-11-13 20:16:35 -05:00
1 parent 8737dbfd5b
commit 407e5a8711
3 files changed
+12 -5

No files matched your search

+6 -1
View File
@@ -1,3 +1,8 @@
/**
* Helper function to get first letter capitalized string
* @param {string} str String whose first letter is to be capitalized
* @returns A string with first letter capitalized
*/
export const capitalizeFirstLetter = (str) =>{
return str.charAt(0).toUpperCase() + str.slice(1);
return str?.charAt(0).toUpperCase() + str.slice(1);
}