https://github.com/jonschlinkert/defaults-deep
Like `extend` but recursively copies only the missing properties/values to the target object.
https://github.com/jonschlinkert/defaults-deep
deep extend javascript jonschlinkert merge nodejs
Last synced: about 2 months ago
JSON representation
Like `extend` but recursively copies only the missing properties/values to the target object.
- Host: GitHub
- URL: https://github.com/jonschlinkert/defaults-deep
- Owner: jonschlinkert
- License: mit
- Created: 2014-10-12T11:12:35.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-08-25T08:08:54.000Z (almost 6 years ago)
- Last Synced: 2025-04-21T13:39:20.810Z (about 2 months ago)
- Topics: deep, extend, javascript, jonschlinkert, merge, nodejs
- Language: JavaScript
- Size: 11.7 KB
- Stars: 25
- Watchers: 3
- Forks: 12
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# defaults-deep [](http://badge.fury.io/js/defaults-deep) [](https://travis-ci.org/jonschlinkert/defaults-deep)
> Like `extend` but recursively copies only the missing properties/values to the target object.
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i defaults-deep --save
```Install with [bower](http://bower.io/)
```sh
$ bower install defaults-deep --save
```## Usage
```js
var defaults = require('defaults-deep');defaults({a: {one: 'one'}}, {a: {two: 'two'}})
//=> {a: {one: 'one', two: 'two'}};
```## Related projects
* [assign-deep](https://github.com/jonschlinkert/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. If a callback… [more](https://github.com/jonschlinkert/assign-deep)
* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util.
* [merge-deep](https://github.com/jonschlinkert/merge-deep): Recursively merge values in a javascript object.
* [mixin-deep](https://github.com/jonschlinkert/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.
* [omit-deep](https://github.com/jonschlinkert/omit-deep): Recursively omit the given keys from an object.## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/defaults-deep/issues/new)
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)## License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 28, 2015._