Class orion.objects
Object-oriented helpers.
Defined in: </jobs/genie.orion/orion-client-dev/workspace/bundles/org.eclipse.orion.client.core/web/orion/objects.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
orion.objects.clone(object)
Creates a shallow clone of the given
object. |
| <static> |
orion.objects.mixin(target, source)
Mixes all
source's own enumerable properties into target. |
| <static> |
orion.objects.toArray(obj)
Wraps an object into an Array if necessary.
|
Method Detail
Creates a shallow clone of the given
object.
- Parameters:
- {Object|Array} object
- The object to clone. Must be a "normal" Object or Array. Other built-ins, host objects, primitives, etc, will not work.
<static>
orion.objects.mixin(target, source)
Mixes all
source's own enumerable properties into target. Multiple source objects
can be passed as varargs.
<static>
{Array}
orion.objects.toArray(obj)
Wraps an object into an Array if necessary.
- Parameters:
- {Object} obj
- An object.
- Returns:
- {Array} Returns
objunchanged, ifobjis an Array. Otherwise returns a 1-element Array whose sole element isobj.