Something went wrong. Try again.
🔥 🔥 🔥 A Free & Self-hostable Airtable Alternative nocodb.com
Something went wrong. Try again.
1234567891011121314151617181920export function getHTMLEncodedText(htmlString: string) { const div = document.createElement('div') div.textContent = htmlString || '' return div.innerHTML}
export const truncateText = (text: string, maxLength = 50) => { if (ncIsNullOrUndefined(text)) { return '' } text = `${text}` if (text.length <= maxLength) return text return `${text.substring(0, maxLength - 3)}...`}
export const capitalize = (str?: string | null): string => { if (!str) return '' return str.charAt(0).toUpperCase() + str.slice(1)}