defaults-deep
Like `extend` but recursively copies only the missing properties/values to the target object.
Last updated 7 years ago by doowb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install defaults-deep 
SYNC missed versions from official npm registry.

defaults-deep NPM version Build Status

Like extend but recursively copies only the missing properties/values to the target object.

Install

Install with npm

$ npm i defaults-deep --save

Install with bower

$ bower install defaults-deep --save

Usage

var defaults = require('defaults-deep');

defaults({a: {one: 'one'}}, {a: {two: 'two'}})
//=> {a: {one: 'one', two: 'two'}};

Related projects

  • assign-deep: Deeply assign the enumerable properties of source objects to a destination object. If a callback… more
  • extend-shallow: Extend an object with the properties of additional objects. node.js/javascript util.
  • merge-deep: Recursively merge values in a javascript object.
  • mixin-deep: Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.
  • omit-deep: Recursively omit the given keys from an object.

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on May 28, 2015.

Current Tags

  • 0.2.4                                ...           latest (7 years ago)

8 Versions

  • 0.2.4                                ...           7 years ago
  • 0.2.3                                ...           9 years ago
  • 0.2.2                                ...           9 years ago
  • 0.2.1                                ...           10 years ago
  • 0.2.0                                ...           10 years ago
  • 0.1.2                                ...           10 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
Maintainers (2)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE