A namespace to hold a miscellany of generic utility functions and other objects. In particular, it also holds sub-namespaces
for more specific operations.
Platform Support
Jaxer Server Framework | Jaxer Client Framework | 1.0 | 1.0 |
---|
Functions
Method | Action | Jaxer Server Framework | Jaxer Client Framework | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
static clone(Object obj, [Boolean deep,] [Number maxDepth]) : Object
Clones an object (actually any argument) and returns the clone. If obj is of type "object", then the clone is created from
the same constructor (but without any arguments). For a deep clone, every (enumerable) property is itself cloned; otherwise,
every (enumerable) property is simply copied (by value or reference).
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static concatArrays([Object ...]) : Array
Returns an array whose elements consist of the elements of all the arrays or array-like objects passed in as arguments. If
any of the arguments is null or undefined (i.e. is equivalent to false) it is skipped.
|
Show Details | 1.0 | 1.0 | |||||||||||
Parameters
Returns
|
||||||||||||||
static extend(Object obj, Object extensions) : Object
Extends an object by (shallow) cloning it and then copying all (enumerable) properties from the extensions object to the new
cloned object.
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static filter(Array array, Function func) : Array
Remove items from an array that do not pass a given criteria. Each item in the specified array will be passed to the filtering
function. If that function returns true, then the item will be appended to the resulting array. If the function returns false,
the item is not added to the resulting array. Note that the specified array is not altered in place. A new array is created
as a result of this function call.
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static filterInPlace(Array array, Function func) : Array
Remove items from an array that do not pass a given criteria. Each item in the specified array will be passed to the filtering
function. If that function returns true, then the item will remain in the specified array. If the function returns false,
the item is removed from the specified array. Note that the specified array is altered in place. If you prefer to create a
new array, leaving the original in tact, then use Util.filter instead
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static foreach(Array array, Function func) :
void
Apply a function to each element in an array.
|
Show Details | 1.0 | no | |||||||||||
Parameters
|
||||||||||||||
static getPropertyNames(Object object, [Function filter,] [Boolean asHash]) : Object
Get all property names or filtered subset of names from an object.
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static hasProperties(Object object, Array<String> properties) : Boolean
Determine if the specified object contains all properties in a list of property names.
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static isDate(Object obj) : Boolean
Tests whether the given object is a Date object (even if it's from a different global context)
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static isEmptyObject(Object obj) : Boolean
Tests whether the given object is devoid of any (enumerable) properties.
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static isNativeFunction(Function func) : Boolean
Tests whether the given function is native (i.e. for which there is actually no source code)
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static isNativeFunctionSource(String source) : Boolean
Tests whether the given string is the source of a native function (i.e. for which there is actually no source code)
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static map(Array array, Function func) : Array
Create a new array by applying the result of a function to each of the items in the array.
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static mapInPlace(Array array, Function func) : Array
Replace each item of an array by applying a function and then replacing the original item with the results of that function.
|
Show Details | 1.0 | no | |||||||||||
Parameters
Returns
|
||||||||||||||
static sleep(Number milliseconds) :
void
Does nothing for the given number of milliseconds
|
Show Details | 1.0 | no | |||||||||||
Parameters
|