安装
npm install deep-assign
yarn add deep-assign
pnpm add deep-assign
bun add deep-assign
README

deep-assign Build Status

Recursive Object.assign()

Install

$ npm install --save deep-assign

Usage

var deepAssign = require('deep-assign');

deepAssign({a: {b: 0}}, {a: {b: 1, c: 2}}, {a: {c: 3}});
//=> {a: {b: 1, c: 3}}

deepAssign(target, source, [source, ...])

Recursively assigns own enumerable properties of source objects to the target object and returns the target object. Additional source objects will overwrite previous ones.

License

MIT © Sindre Sorhus

版本列表
3.0.0 2018-11-08
2.0.0 2015-10-20
1.0.0 2015-09-14