extend()

Adds extra properties to an object based on the properties owned by other specified objects.

This function is valid in v2.0.0 to v2.23.0. This function has been downloaded 30 times.

Parameters

{Object} objToExtend
Object to be modified.
{…Object} objPropsX
One or more arguments where each one's properties will be added to objToExtend.

Returns

{Object}
A reference to objToExtend.

Required Function

This function directly 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.

Requiring Functions

This function is directly required by the following functions:

  • flatMap()
    Iterates through each item in an array or an object, passing the item to a mapping function, and flattens the result into the array or object.
  • postURL()
    Takes a URL and goes to it using the POST method.