项目作者: Xotic750

项目描述 :
Used to copy the values of all enumerable own properties from one or more source objects to a target object.
高级语言: JavaScript
项目地址: git://github.com/Xotic750/object-assign-x.git
创建时间: 2017-08-17T13:41:47Z
项目社区:https://github.com/Xotic750/object-assign-x

开源协议:Other

下载



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.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.
Param Type Description
target * The target object.
[…source] * The source object(s).

Example

  1. import assign from 'object-assign-x';
  2. const obj = {a: 1};
  3. const copy = assign({}, obj);
  4. console.log(copy); // { a: 1 }