An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

        

# defaults-deep [![NPM version](https://badge.fury.io/js/defaults-deep.svg)](http://badge.fury.io/js/defaults-deep) [![Build Status](https://travis-ci.org/jonschlinkert/defaults-deep.svg)](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._