Copying all properties of one object to another one is a common operation in JavaScript. This blog post explains ECMAScript 6’s implementation of it, which is calledObject.assign().
This merging operation has a name in the JavaScript ecosystem that is only used there (and, unfortunately, clashes with classic OOP terminology): “extend”.
This function copies all enumerable [1] own operties from source to target. It returns the (modified) target. The exact signature of the function is still being debated, there may eventually be support for more than one source.
Your new post is loading...