menu

SiteGenesis / Server-side JS / Module: object

Methods

(static) extend(target, source) → {Object}

Deep copies all all object properties from source to target

Parameters:
Name Type Description
target Object

The target object which should be extended

source Object

The object for extension

Source:
Returns:
Type
Object

(static) fromHashMap(object) → {Object}

Convert the given Map to a plain object

Parameters:
Name Type Description
object dw.util.Map
Source:
Returns:

all the data which will be used in mail template.

Type
Object

(static) keys(object) → {Array}

A shortcut for native static method "keys" of "Object" class

Parameters:
Name Type Description
object Object
Source:
Returns:
Type
Array

(static) resolve(object, propertyString) → {Object}

Access given properties of an object recursively

Parameters:
Name Type Description
object Object

The object

propertyString String

The property string, i.e. 'data.myValue.prop1'

Source:
Returns:

The value of the given property or undefined

Type
Object
Example
var prop1 = require('~/object').resolve(obj, 'data.myValue.prop1')

(static) toHashMap(object) → {dw.util.HashMap}

Convert the given object to a HashMap object

Parameters:
Name Type Description
object Object
Source:
Returns:

all the data which will be used in mail template.

Type
dw.util.HashMap

(static) values(object) → {Array}

Returns an array containing all object values

Parameters:
Name Type Description
object Object
Source:
Returns:
Type
Array