An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          


Travis status


Dependency status


devDependency status


npm version


jsDelivr hits


bettercodehub score


Coverage Status

## 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 }
```