From a dictionary, build the querystring part of a URL.
Resulting string can be appended to URLs after the ?
character.
Dictionary with keys and values
The querystring that can be appended to URLs
Build a full HTTP/S URL from the various fragments.
Base of the URL, including the protocol (e.g. http://foo.bar/
)
Path, either as string or array (e.g. 'api/create' or ['api', 'create'])
Dictionary with GET parameters
The full URL
Clone a JS object, deeply.
The object to clone (any scalar or non-scalar type)
The cloned object
Remove all empty properties from an object.
If "onlyNull", remove all null
value only.
The object obj
, which is passed by reference, is modified.
Object to compact
If true, remove only values that are strictly null
(default: false)
Get a nested property from a dictionary or array, referenced by a string in "dot notation". For example: "key1.key2.0"
Object containing the property
Name of the nested property
Value of the referenced property or undefined
Check if a value is numeric.
Value to analyze
True if value is numeric
Check if a value is a plain object.
Value to analyze
True if value is a plain object
Check if a value is of a scalar type (string, number, boolean).
Value to analyze
True if value is of a scalar type
Flatten a dictionary to the "dot notation", as used by MongoDB. If preserveArrays is true, arrays are not transformed to the "dot notation".
Dictionary to convert
If true, arrays are not transformed to the "dot notation" (default: false)
Flattened dictionary in "dot notation"
Take str
and put a backslash in front of every character that is part of the regular expression syntax.
Port of the PHP function "preg_quote". See also: http://php.net/preg_quote
String to escape
If the optional delimiter is specified, it will also be escaped. This is useful for escaping the delimiter that is required by the regular expressions. The / is the most commonly used delimiter.
Quoted (escaped) string
Determine if a given string matches a pattern, allowing * as wildcard.
Pattern to search in value
String in which the pattern is searched
True if value matches pattern
Convert strings with dashes or underscores (eg. 'foo-bar' or 'foo_bar') to camelCase ('fooBar')
Dashed string
String converted to camelCase
Strip HTML tags, except allowed ones. This function is a port of the PHP strip_tags function: http://php.net/strip_tags
Input string
String listing allowed HTML tags, for example <br>
String with HTML tags stripped
Convert a value to string, ensuring that the number 0 and the boolean false are treated correctly.
Value to convert
String value
Update a property (represented in the "dot notation") in an object.
The object obj
, which is passed by reference, is modified.
Object to the be updated
Name of the property to update, in "dot notation"
New value for the matched property
Generated using TypeDoc
Collection of utilities