Skip to main content

utilities

This module contains generic utility functions useful for various operations.

Utilities include formatting currencies, manipulating strings, generating identifiers, and validating inputs.

Index

Functions

FunctionDescription
formatCurrencyFormats a number as currency with a given currency code. Utilizes the Intl.NumberFormat API to handle locale-specific currency formatting.
generateUniqueIdConverts a string to title case, making the first character of each word uppercase. Effective for formatting titles or names in a readable format.
isValidEmailFunction to check if a value is a valid email address.
shuffleArrayFunction to shuffle an array.
toTitleCaseFunction to convert a string to title case.
truncateStringFunction to truncate a string to a specified length.