Core
Last updated
Last updated
Core utility functions/classes for Transformers.js.
These are only used internally, meaning an end-user shouldnβt need to access anything here.
static
: *
β Object
β string
β boolean
β boolean
β boolean
β boolean
β Array
β *
β Array
inner
A base class for creating callable objects.
Reverses the keys and values of an object.
data
Object
The object to reverse.
Escapes regular expression special characters from a string by replacing them with their escaped counterparts.
string
string
The string to escape.
Check if a value is a string.
text
*
The value to check.
Check if a value is a typed array.
val
*
The value to check.
Check if a value is an integer.
x
*
The value to check.
Check if a value is exists.
x
*
The value to check.
Calculates the dimensions of a nested array.
arr
Array
The nested array to calculate dimensions for.
Replicate pythonβs .pop() method for objects.
Error
If the key does not exist and no default value is provided.
obj
Object
The object to pop from.
key
string
The key to pop.
defaultValue
*
The default value to return if the key does not exist.
arrs
Array.<Array>
Arrays to merge.
Creates a new instance of the Callable class.
This method should be implemented in subclasses to provide the functionality of the callable object.
Error
If the subclass does not implement the `_call` method.
...args
Array.<any>
Kind: static constant of
Kind: static method of
Returns: Object
- The reversed object.
See:
Kind: static method of
Returns: string
- The escaped string.
Kind: static method of
Returns: boolean
- True if the value is a string, false otherwise.
Kind: static method of
Returns: boolean
- True if the value is a TypedArray
, false otherwise.
Adapted from
Kind: static method of
Returns: boolean
- True if the value is a string, false otherwise.
Kind: static method of
Returns: boolean
- True if the value exists, false otherwise.
Kind: static method of
Returns: Array
- An array containing the dimensions of the input array.
Kind: static method of
Returns: *
- The value of the popped key.
Throws:
Efficiently merge arrays, creating a new copy. Adapted from
Kind: static method of
Returns: Array
- The merged array.
Kind: inner class of
Kind: instance method of Throws: