Extends an object or an array
extend(target, source1, source2, ...)
target |
object or array, object to clone |
source1 |
object or array, object to clone |
Returns
Object or
Array
Extends the specified object or the array. If target is an array, then the source-N can only be an array too. It
will perform a concatination of arrays, cloning each item. If target is an object, then the source-N can only be objects
and it will extend target with all keys in the source, cloning them. It is not a deep merge, but rather copy of top level
keys cloning if they are objects