copyProps()

Copies the specified properties from the source object to the target object.

This function is valid in v2.9.0 to v2.12.3. This function has been downloaded 16 times.

Parameters

{*} target
Target object to which the properties will be copied.
{*} source
Source object from which the properties will be copied.
{Array} keys
Array of keys for the properties that should be copied from source to target.

Returns

{*}
Returns a reference to target.

Required Function

This function requires the following function which is included automatically:

  • has()
    Every object descended from Object inherits the hasOwnProperty method. This method can be used to determine whether an object has the specified property as a direct property of that object; unlike the in operator, this method does not check down the object's prototype chain.