Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

sindresorhus/deep-assign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED

Version 2 of this module ended up being something I don't want and I don't have time to fix it.

Check out lodash.merge or merge-options instead.


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.

Related

License

MIT © Sindre Sorhus