https://github.com/xotic750/object-assign-x
Used to copy the values of all enumerable own properties from one or more source objects to a target object.
https://github.com/xotic750/object-assign-x
assign browser javascript nodejs object
Last synced: about 1 year ago
JSON representation
Used to copy the values of all enumerable own properties from one or more source objects to a target object.
- Host: GitHub
- URL: https://github.com/xotic750/object-assign-x
- Owner: Xotic750
- License: mit
- Created: 2017-08-17T13:41:47.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-02T15:51:24.000Z (almost 3 years ago)
- Last Synced: 2025-04-30T20:08:23.484Z (about 1 year ago)
- Topics: assign, browser, javascript, nodejs, object
- Language: JavaScript
- Size: 2.86 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## object-assign-x
Used to copy the values of all enumerable own properties from one or more source objects to a target object.
### `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**
```js
import assign from 'object-assign-x';
const obj = {a: 1};
const copy = assign({}, obj);
console.log(copy); // { a: 1 }
```