Bunoon: TESS | Manual | Object

This area contains a set of functions that are used for handling and manipulating Objects. Objects are useful for storing information in property keys, which are sorted in alphabetical order. Also in this area, you will find functions that will allow you to merge a set of objects, get all available properties, delete specific properties, clone an object and much more.

If you are looking to store your information in arrays, please see the Arrays documentation page.

Takes an object (dictionary based) and merges it with a list (from arguments) of objects (if the items don't already exist).

The main arguments for this function are as follows:

  • oObject [Object] - The object that should be merged into.
  • [arguments] - An arguments object array containing the list of objects to merge together.

The return value for this function is as follows:

  • [Object] - An object based on the merged objects (or null if any error has occurred).

Below is an example of how to use this function:

var oObject1 = {name: 'John', last: 'Doe'}

var oObject2 = {age: 30}


var oMerged = $T.Object.Merge(oObject1, oObject2);

Takes an object and clones it as a return value.

The main arguments for this function are as follows:

  • oObject [Object] - The object that should be cloned.

The return value for this function is as follows:

  • [Object] - A cloned object (or the object passed itself if not valid).

Below is an example of how to use this function:

var oObject = {name: 'John', last: 'Doe'}


var oClone = $T.Object.Clone(oObject);

Takes an object and ensures that it is completely cleared.

The main arguments for this function are as follows:

  • oObject [Object] - The object that should be cleared.

The return value for this function is as follows:

  • [Object] - An empty object (or null if any error has occurred).

Below is an example of how to use this function:

var oObject = {name: 'John', last: 'Doe'}


oObject = $T.Object.Clear(oObject);

Takes an object and builds up an array of every property it's using.

The main arguments for this function are as follows:

  • oObject [Object] - The object that should be used.

The return value for this function is as follows:

  • [Object] - An array of properties (or null if any error has occurred).

Below is an example of how to use this function:

var oObject = {name: 'John', last: 'Doe'}


var aProperties = $T.Object.Properties(oObject);

Takes an object and deletes a specified property.

The main arguments for this function are as follows:

  • oObject [Object] - The object that should be updated.
  • sProperty [String] - The property that should be deleted.

The return value for this function is as follows:

  • [Object] - The updated object (or null if any error has occurred).

Below is an example of how to use this function:

var oObject = {name: 'John', last: 'Doe'}


oObject = $T.Object.Delete(oObject, 'name');

Takes an object and gets the number of properties it has.

The main arguments for this function are as follows:

  • oObject [Object] - The object that should be used.

The return value for this function is as follows:

  • [Object] - The number of properties in the object (or null if any error has occurred).

Below is an example of how to use this function:

var oObject = {name: 'John', last: 'Doe'}


var nCount = $T.Object.Count(oObject);

Generates an Enum based on the values that are passed (it overrides are set for specific items, the count is increased and continued from that point).

The main arguments for this function are as follows:

  • aEnumNames [Array] - An array containing the names to use in the new Enum.
  • oEnumValues [Object] - An object containing any override values that should be used for specific Enum name.

The return value for this function is as follows:

  • [Object] - A new functional Enum object (or null if any error has occurred).

Below is an example of how to use this function:

var oPerson = new $T.Object.Enum(['First', 'Last', 'Age', 'DOB', 'Address'], {'Age': 5});