Namespace

DuJSObj

DuJSObj

JS Objects related methods

View Source Duik_api_fordoc.jsxinc, line 919

Methods

# static clear(obj, ignoredPropertiesopt)

Deletes all properties from an object, except a predefined list.
Parameters:
Name Type Attributes Description
obj object The object to clear.
ignoredProperties Array.<string> <optional>
The properties to keep

View Source Duik_api_fordoc.jsxinc, line 963

# static sort(obj, reverseopt, compareFnopt) → {object}

Sorts object keys and returns a new sorted object.
Parameters:
Name Type Attributes Default Description
obj object The object to sort.
reverse bool <optional>
false Set to true to sort in the reverse order.
compareFn function <optional>
Specifies a function that defines the sort order. Note that this parameter is ignored if reversed is true.
If omitted, the keys are converted to strings, then sorted according to each character's Unicode code point value.

View Source Duik_api_fordoc.jsxinc, line 929

The new sorted object.
object