2.1.2 • Published 5 years ago

object-assign-x v2.1.2

Weekly downloads
266
License
MIT
Repository
github
Last release
5 years ago

object-assign-x

Used to copy the values of all enumerable own properties from one or more source objects to a target object.

module.exportsObject

This method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object.

Kind: Exported member
Returns: Object - The target object.
Throws:

  • TypeError If target is null or undefined.
ParamTypeDescription
target*The target object.
...source*The source object(s).

Example

import assign from 'object-assign-x';

const obj = {a: 1};
const copy = assign({}, obj);
console.log(copy); // { a: 1 }