First commit

This commit is contained in:
2026-02-19 01:15:36 +03:30
commit a898eccbff
1216 changed files with 189771 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
// Returns initials from string
export const getInitials = (string: string) =>
string.split(/\s/).reduce((response, word) => (response += word.slice(0, 1)), '')
+4
View File
@@ -0,0 +1,4 @@
export const ensurePrefix = (str: string, prefix: string) => (str.startsWith(prefix) ? str : `${prefix}${str}`)
export const withoutSuffix = (str: string, suffix: string) =>
str.endsWith(suffix) ? str.slice(0, -suffix.length) : str
export const withoutPrefix = (str: string, prefix: string) => (str.startsWith(prefix) ? str.slice(prefix.length) : str)