Utils
The sdk.utils object provides a wide range of utility functions that help you build dynamic, user-friendly, and responsive views inside MonoChat. These include formatting, file uploading, timers, role checks, notifications, and more.
Categories
Formatting
formatDate(date)– Returns a formatted date string.formatDateTime(date)– Returns a full date-time string.formatDateTimeLocal(date)– Returns locale-aware date-time string.currency.priceString(isoCode, price, options)– Formats a price with currency.
HTML/Serialization
slugify(string)– Converts a string into a URL-safe slug.serialize(obj)– Serializes an object into a string.deserialize(string)– Converts a serialized string back into an object.
Loading State
loading.show()– Blocks the view with a loading spinner.loading.remove()– Removes the loading overlay.