@logotip4ik_/defaults-deep
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

@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.

Package Sidebar

Install

npm i @logotip4ik_/defaults-deep

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

5.22 kB

Total Files

5

Last publish

Collaborators

  • logotip4ik_