Javascript Object
From Yate Documentation
(Difference between revisions)
(Created page with " == General == == Methods == * '''assign()''' * '''assignProps()''' * '''keys([obj])''' Retrieve the list of of the calling script.<br/> Parameters:<br/> '''obj''' Obje...") |
(→Methods) |
||
Line 4: | Line 4: | ||
== Methods == | == Methods == | ||
− | * '''assign()''' | + | * '''assign(dest[,src[,src1 ...])''' |
+ | Assign object(s) properties to another object.<br/> | ||
+ | Parameters:<br/> | ||
+ | '''dest''' Destination object. Does nothing if not an object.<br/> | ||
+ | '''src''' Source object. Does nothing if not an object.<br/> | ||
+ | '''src1 ...''' Other source object(s). Does nothing if not an object.<br/> | ||
+ | Return:<br/> | ||
+ | Given ''dest'' data. | ||
* '''assignProps()''' | * '''assignProps()''' | ||
+ | |||
Line 16: | Line 24: | ||
Return:<br/> | Return:<br/> | ||
Array of key values. null if given object has no properties (e.g. obj=undefined) | Array of key values. null if given object has no properties (e.g. obj=undefined) | ||
+ | |||
* '''global()''' | * '''global()''' |
Revision as of 13:35, 3 September 2024
General
Methods
- assign(dest[,src[,src1 ...])
Assign object(s) properties to another object.
Parameters:
dest Destination object. Does nothing if not an object.
src Source object. Does nothing if not an object.
src1 ... Other source object(s). Does nothing if not an object.
Return:
Given dest data.
- assignProps()
- keys([obj])
Retrieve the list of of the calling script.
Parameters:
obj Object to list keys for. List calling script's global data object keys if this parameter is not given.
Return:
Array of key values. null if given object has no properties (e.g. obj=undefined)
- global()
Retrieve the context (data) of the calling script.
Return:
Object containing all global data of the calling script.