A collection of plain JavaScript utility functions for ASL19 projects.
These functions don’t rely on DOM, React, or React Native APIs.
|
Function |
Description |
|---|---|
|
Cast an object to a specified data type. | |
|
Returns a URL with trailing | |
|
Format a root-relative URL based on provided path and query string key-value pairs. | |
|
Given provided protocol + host string and root-relative URL string returns an absolute (fully-qualified) URL. | |
|
Given an array or a string, return its first string element. | |
|
Returns a normalized representation of the passed query with default values. | |
|
getObjectValueByDotSeparatedKey({ dotSeparatedKey, object, }) |
Given a provided dot-separated key (e.g. |
|
Given a fully-qualified URL, returns a root-relative URL. | |
|
Returns true if string is null, an empty string, or a string of whitespace characters. | |
|
Replace Arabic (Hindu–Arabic/Western Arabic/Latin) numerals with Persian (Perso-Arabic) numerals. | |
|
Logs a formatted message based on the provided description, HTTP status code, and path. | |
|
Given an underscore-cased string, returns a camel-cased string. |