object-assign-x
Used to copy the values of all enumerable own properties from one or more source objects to a target object.
Version: 1.1.0
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750
module.exports
⇒ Object
⏏
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.
Param | Type | Description |
---|
target | * | The target object. |
[...source] | * | The source object(s). |
Example
var assign = require('object-assign-x');
var obj = { a: 1 };
var copy = assign({}, obj);
console.log(copy);