Skip to content

Greginator/extend-deep

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

extend-deep

Merge object recursively, don't impact the sources

Install

$ npm install extend-deep

Usage

var obj1 = {
  apple: 0,
  pear: ['yellow', 'red'],
  banana: { weight: 52, price: 100 },
  cherry: 97
};
var obj2 = {
  pear: ['white'],
  banana: { price: 200 },
  durian: 100
};
extend(obj1, obj2);
// => {"apple":0,"pear":["white","red"],"banana":{"weight":52,"price":200},"cherry":97,"durian":100}

License

The MIT License

About

Merge object recursively, don't impact the sources

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%