util-x. A Javascript utility library..
Namespaces
Type Definitions
Arguments
An Array-like object corresponding to the arguments passed to a function.
Type:
- Arguments
- Source:
- See:
Array
A javascript array object.
Type:
- Array
- Source:
- See:
ArrayLike
Objects that are array like, in that they are an integer indexed list
that have a length property which is integer between 0 and 2^32-1 (inclusive)
Type:
- Arrays | Object
Arrays
Host objects that are of an array structure.
Type:
- Array | Arguments
bindTargetFunction(…varArgsopt) → {*}
Target function.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
varArgs |
* |
<optional> <repeatable> |
Returns:
- Type
- *
boolean
Type consisting of the primitive
values true and false
Type:
- boolean
- Source:
- See:
boundFunction(…varArgsopt) → {*}
Bound function.
This:
- thisArg
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
varArgs |
* |
<optional> <repeatable> |
Returns:
- Type
- *
boundPrototypalFunction(…varArgsopt) → {*}
Stand alone function created from a prototypalFunction.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
varArgs |
* |
<optional> <repeatable> |
Returns:
- Type
- *
Date
Instance that represents a single moment in time. Date objects are based on a time value that is the number
of milliseconds since 1 January, 1970 UTC.
Type:
- Object
- Source:
- See:
equalityFn(a, b) → {boolean}
Compares operand a against operand b and returns true if they are deemed to be the same value.
Otherwise returns false.
Parameters:
Name | Type | Description |
---|---|---|
a |
* | |
b |
* |
Returns:
- Type
- boolean
Error
Instances of Error objects are thrown when runtime errors occur.
Type:
- Error
- Source:
- See:
EvalError
The EvalError object indicates an error regarding the global eval() function.
Type:
- EvalError
- Source:
- See:
everyCallback(element, index, object) → {*}
The every method executes the provided callback function once for each element present in the array
until it finds one where callback returns a falsy value (a value that becomes false when converted to a Boolean).
If a thisArg parameter is provided to some, it will be passed to callback when invoked,
for use as its this value. Otherwise, the value undefined will be passed for use as its this value.
Parameters:
Name | Type | Description |
---|---|---|
element |
* | The current element being processed in the array. |
index |
number | The index of the current element being processed in the array. |
object |
Object | The object that every was called upon. |
Returns:
- Type
- *
findCallback(element, index, object) → {boolean}
The find method executes the callback function once for each element present in the array until it
finds one where callback returns a true value.
If a thisArg parameter is provided to some, it will be passed to callback when invoked,
for use as its this value. Otherwise, the value undefined will be passed for use as its this value.
Parameters:
Name | Type | Description |
---|---|---|
element |
* | The current element being processed in the array. |
index |
number | The index of the current element being processed in the array. |
object |
Object | The object that find was called upon. |
Returns:
- Type
- boolean
findIndexCallback(element, index, object) → {boolean}
The findIndex method executes the callback function once for each element present in the array until it
finds one where callback returns a true value.
If a thisArg parameter is provided to some, it will be passed to callback when invoked,
for use as its this value. Otherwise, the value undefined will be passed for use as its this value.
Parameters:
Name | Type | Description |
---|---|---|
element |
* | The current element being processed in the array. |
index |
number | The index of the current element being processed in the array. |
object |
Object | The object that findIndex was called upon. |
Returns:
- Type
- boolean
forEachCallback(element, index, object) → {undefined}
forEach executes the callback function once for each array element;
unlike every and some it does not return a value.
If a thisArg parameter is provided to forEach, it will be passed to callback when invoked,
for use as its this value. Otherwise, the value undefined will be passed for use as its this value.
Parameters:
Name | Type | Description |
---|---|---|
element |
* | The current element being processed in the array. |
index |
number | The index of the current element being processed in the array. |
object |
Object | The object that forEach was called upon. |
Returns:
- Type
- undefined
forKeysCallback(element, index, object) → {boolean}
forKeys executes the callback function once for each own property present in the object until it finds one
where callback returns a true value.
If a thisArg parameter is provided to some, it will be passed to callback when invoked,
for use as its this value. Otherwise, the value undefined will be passed for use as its this value.
Parameters:
Name | Type | Description |
---|---|---|
element |
* | The current property being processed in the object. |
index |
prop | The property name of the current property being processed in the object. |
object |
Object | The object that some was called upon. |
Returns:
- Type
- boolean
fromCallback(element, index) → {*}
from calls a provided callback function once for each element in an arrayLike object, in order,
and constructs a new array from the results.
Parameters:
Name | Type | Description |
---|---|---|
element |
* | The current element being processed in the array. |
index |
number | The index of the current element being processed in the array. |
Returns:
- Type
- *
Function()
In JavaScript every function is actually a Function object.
- Source:
- See:
mapCallback(element, index, object) → {*}
map calls a provided callback function once for each element in an arrayLike object, in order,
and constructs a new array from the results.
If a thisArg parameter is provided to some, it will be passed to callback when invoked,
for use as its this value. Otherwise, the value undefined will be passed for use as its this value.
Parameters:
Name | Type | Description |
---|---|---|
element |
* | The current element being processed in the array. |
index |
number | The index of the current element being processed in the array. |
object |
Object | The object that map was called upon. |
Returns:
- Type
- *
null
A regular expression object for matching text with a pattern.
Type:
- Object
- Source:
- See:
number
Set of all possible Number values including the special Not-a-Number (NaN) values, positive infinity,
and negative infinity.
Type:
- number
- Source:
- See:
NumberLike
A number or string to be used as a number.
Type:
- number | string
Object
A basic javascript object.
Type:
- Object
- Source:
- See:
primitive
Type consisting of the primitive values.isFunction
Type:
- null | undefined | boolean | string | number
prototypalFunction(…varArgsopt) → {*}
Prototypal function, as usually used in
inheritance and the prototype chain.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
varArgs |
* |
<optional> <repeatable> |
Returns:
- Type
- *
Prototype
When it comes to inheritance, JavaScript only has one construct: objects.
Each object has an internal link to another object called its prototype.
That prototype object has a prototype of its own, and so on until an object is reached with
null as its prototype. null, by definition, has no prototype, and acts as the final link in
this prototype chain.
Type:
- Object
- Source:
- See:
RangeError
The RangeError object indicates an error when a value is not in the set or range of allowed values.
Type:
- RangeError
- Source:
- See:
ReferenceError
The ReferenceError object represents an error when a non-existent variable is referenced.
Type:
- ReferenceError
- Source:
- See:
RegExp
A regular expression object for matching text with a pattern.
Type:
- RegExp
- Source:
- See:
someCallback(element, index, object) → {boolean}
some executes the callback function once for each element present in the array until it finds one
where callback returns a true value.
If a thisArg parameter is provided to some, it will be passed to callback when invoked,
for use as its this value. Otherwise, the value undefined will be passed for use as its this value.
Parameters:
Name | Type | Description |
---|---|---|
element |
* | The current element being processed in the array. |
index |
number | The index of the current element being processed in the array. |
object |
Object | The object that some was called upon. |
Returns:
- Type
- boolean
string
Set of all possible String values.
Type:
- string
- Source:
- See:
StringLike
A string or number to be used as a string.
Type:
- string | number
SyntaxError
The SyntaxError object represents an error when trying to interpret syntactically invalid code.
Type:
- SyntaxError
- Source:
- See:
TypeError
The TypeError object represents an error when a value is not of the expected type.
Type:
- TypeError
- Source:
- See:
undefined
Type whose sole value is the undefined value
Type:
- undefined
- Source:
- See:
URIError
The URIError object represents an error when a global URI handling function was used in a wrong way.
Type:
- URIError