Utils
Utility functions and helpers for forms, dates, strings, passwords, and more.
Counters
Name | Description |
|---|---|
| Returns the counter content for a stack display based on the number of items, counter type, and item limit. |
Data
Name | Description |
|---|---|
| Converts an array of objects into SelectOption[] by mapping specified keys or transformation functions. |
| Creates a promise that resolves after a specified delay in milliseconds. |
| Returns a paginated subset of an array. |
Dates
Name | Description |
|---|---|
| Formats a date string (YYYY-MM-DD or ISO 8601) into a localized full date. |
| Formats a date (ISO string or timestamp) into a localized full date with optional time. |
Encoding
Name | Description |
|---|---|
| Encodes an SVG string to a Data URI. |
Errors
Name | Description |
|---|---|
| Returns an error message depending on the environment. |
Events
Name | Description |
|---|---|
| Copies text to the clipboard. |
Form filters
Name | Description |
|---|---|
| Filters out non-alphabetic characters from a given string. |
Form validation
Name | Description |
|---|---|
| Validates whether a given array field is not empty. |
| Validates whether a given boolean field is true. |
| Validates whether a given date range is valid. |
| Validates whether a given value is a valid email address. |
| Validates whether a given value is present (not null, undefined, or empty string). |
| Validates that two password values match. |
| Validates whether a given value is a valid URL. |
Numbers
Name | Description |
|---|---|
| Formats a number into a string with thousands separators using Intl locale rules. |
Passwords
Name | Description |
|---|---|
| Evaluates secure password conditions. |
| Generates a secure password that meets specified security requirements. |
| Checks if all secure password conditions are fulfilled. |
Ratings
Name | Description |
|---|---|
| Returns an array of MDI icon names representing a indicator rating. |
Strings
Name | Description |
|---|---|
| Converts a string into a URL-friendly slug format. |
| Extracts the last four digits from a given credit card number. |
| Returns the full name of a user by combining first and last names. |
| Extracts initials from a full name string. |
| Converts the first letter of a string to lowercase while keeping the rest unchanged. |
| Trims leading and trailing whitespace from a string. |
| Converts the first letter of a string to uppercase while keeping the rest unchanged. |
Users
Name | Description |
|---|---|
| Generates a unique username based on the user's first name and last names. |
| Generates a display name using the first name and only the first last name. |