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 |
|---|
Classes
Functions
![]() |
||||||||||||||
| Method | Action | Jaxer Server Framework | Jaxer Client Framework | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
static getGlobalContext([Object obj]) : Object
Find the global context ('window', in the browser) to which the given object is ultimately parented. If no object is given,
returns the developer page's window object, and if that does not exist for some reason, returns the framework's global context.
(Advanced) |
Show Details | 1.0 | no | |||||||||||
|
Parameters
Returns
|
||||||||||||||
|
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 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 intact, then use the native Array's filter method instead.
|
Show Details | 1.0 | no | |||||||||||
|
Parameters
Returns
|
||||||||||||||
|
static findInGlobalContext(String objectName, [Object objForGlobalContext]) : Object
Finds the named object within the global context ('window', in the browser) to which the second argument is ultimately parented.
If no second argument is given, finds the named object in the developer page's window object, and if that does not exist for
some reason, finds it in the Jaxer framework's global context.
|
Show Details | 1.0 | no | |||||||||||
|
Parameters
Returns
|
||||||||||||||
|
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, 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 isArray(Object obj) : Boolean
Tests whether the given object is an Array object (even if it's from a different global context). This returns false on Array-like
objects that are not in fact arrays, such as the arguments object inside a function.
|
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 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
|
||||||||||||||

