Module: core/utils

Methods

(inner) createXPath(namespaceMap)

Create an xPath lookup function bound to the given namespaceMap.
Parameters:
Name Type Description
namespaceMap the mapping from prefix to namespace URL.
Source:
Returns:
the xPath function

(inner) createXPathArray(namespaceMap)

Create an xPath lookup function (that itself returns arrays of elements) bound to the given namespaceMap.
Parameters:
Name Type Description
namespaceMap the mapping from prefix to namespace URL.
Source:
Returns:
the xPath function

(inner) deepMerge(target, other)

Recursivly merges two hash-tables.
Parameters:
Name Type Description
target the object the other one will be merged into
other the object that will be merged into the target
Source:

(inner) objectToKVP(obj)

Convenience function to serialize an object to a KVP encoded string.
Parameters:
Name Type Description
obj The object to serialize
Source:
Returns:
the constructed KVP string

(inner) stringToFloatArray(string, separator)

Utility function to split a string and parse an array of floats.
Parameters:
Name Type Description
string the string to split and parse
separator an (optional) separator, the string shall be split with. Defaults to " ".
Source:
Returns:
an array of the parsed values

(inner) stringToIntArray(string, separator)

Utility function to split a string and parse an array of integers.
Parameters:
Name Type Description
string the string to split and parse
separator an (optional) separator, the string shall be split with. Defaults to " ".
Source:
Returns:
an array of the parsed values