0.1.3 • Published 2 years ago

@logotip4ik_/defaults-deep v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@logotip4ik_/defaults-deep

NOTE: This is a fork of original defaults-deep but with vulnerability fixes and hopefully better maintenance 👀

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

Install

Install with npm

$ npm i @logotip4ik_/defaults-deep

Install with yarn

$ yarn add @logotip4ik_/defaults-deep

Usage

import defaults from "@logotip4ik_/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 and stub the project (more about stubbing on antfu.me):

$ yarn

$ yarn build:stub

$ yarn test

Contributing

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

Author

Jon Schlinkert

Bogdan Kostyuk

added vulnerability fix

License

Copyright © 2022 Bogdan Kostyuk Released under the MIT license.