Socket
Socket
Sign inDemoInstall

lodash.defaultsdeep

Package Overview
Dependencies
0
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lodash.defaultsdeep

The Lodash method `_.defaultsDeep` exported as a module.


Version published
Weekly downloads
1.1M
increased by5.82%
Maintainers
2
Install size
55.6 kB
Created
Weekly downloads
 

Package description

What is lodash.defaultsdeep?

The lodash.defaultsdeep package is a utility that allows for deep merging of default object properties. It is particularly useful for initializing configuration objects with default values while preserving any user-defined values. This package recursively assigns default properties, which is especially handy when dealing with nested objects.

What are lodash.defaultsdeep's main functionalities?

Deep merging of objects

This feature allows for the deep merging of nested objects, ensuring that all default properties are set while preserving any existing values in the target object. It's particularly useful for setting up configurations with nested properties.

{"const defaults = { user: { name: 'Anonymous', preferences: { theme: 'dark' } } }; const userConfig = { user: { preferences: { notifications: true } } }; _.defaultsDeep(userConfig, defaults); // Result: { user: { name: 'Anonymous', preferences: { theme: 'dark', notifications: true } } }"}

Other packages similar to lodash.defaultsdeep

Readme

Source

lodash.defaultsdeep v4.6.1

The Lodash method _.defaultsDeep exported as a Node.js module.

Installation

Using npm:

$ {sudo -H} npm i -g npm
$ npm i --save lodash.defaultsdeep

In Node.js:

var defaultsDeep = require('lodash.defaultsdeep');

See the documentation or package source for more details.

Keywords

FAQs

Last updated on 10 Jul 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc