function deepCopyProperties(target, source, propertyObj) {
    for (var prop in propertyObj) {
        if (Array.isArray(source[prop])) {
            target[prop] = source[prop].slice();
        }
        else {
            target[prop] = source[prop];
        }
    }
}
Utility function to ensure that object properties are copied by value, and not by reference
@private
@param target - Target object to copy properties into
@param source - Source object for the properties to copy
@param propertyObj - Object containing properties names we want to loop over