diff options
Diffstat (limited to 'src/utils/strings.ts')
| -rw-r--r-- | src/utils/strings.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils/strings.ts b/src/utils/strings.ts index 4786c6b..77608e8 100644 --- a/src/utils/strings.ts +++ b/src/utils/strings.ts @@ -9,3 +9,5 @@ export const pathToFileName = (path: string, ext?: string) => { const dir = path.slice(start, path.lastIndexOf("/")).replaceAll("/", "-"); return `${dir}-${basename(path, ext !== undefined)}${ext ? `.${ext}` : ""}`; }; + +export const capitalize = (str: string) => str.charAt(0).toUpperCase() + str.slice(1); |