Utils
Explore utils docs by category and open each page for usage and source references.
Categories
All pages
Formats a timestamp into a localized date/time string. By default, formatting uses the user's locale and timezone.
Formats an integer cent value as a locale-formatted number string. Returns a plain number string (e.g. `"12.50"`). Currency symbol rendering is intentionally left to the caller so this function remains framework-agnostic and testable in isolation.
Converts text into camelCase using spaces, underscores, and hyphens as separators. The function lowercases all tokens, removes extra separators, and joins subsequent tokens with an uppercase leading character.
Converts a string into a URL-friendly slug. The function lowercases text, removes diacritics, normalizes separators, strips unsupported characters, and joins words with hyphens.
Converts text to title case using spaces, underscores, and hyphens as word separators. The function normalizes separators into single spaces, removes extra separators, and transforms each token so the first character is uppercase while the rest are lowercase.
Checks whether a value is empty. Empty values include `null`, `undefined`, empty strings (after trimming), empty arrays, empty maps, empty sets, and plain objects with no own keys.