HEX
Server: nginx/1.24.0
System: Linux nowruzgan 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64
User: babak (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/dev/nowruzgan/rest/node_modules/merge-defaults/README.md
## Note: Lodash now includes a [`defaultsDeep`](https://lodash.com/docs/4.17.10#defaultsDeep) function.

# merge-defaults

Implements a deep version of `_.defaults`.

> **Important!**
>
> This module DOES NOT merge arrays or dates.


## Installation

```sh
$ npm install merge-defaults
```

## Usage

```javascript

var _ = require('lodash');

// Override basic `_.defaults`
_.defaults = require('merge-defaults');

// Or you can add it as a new method
_.mergeDefaults = require('merge-defaults');

```

## Why?

This module is a temporary solution, until lodash has something
similar in core that can be called as a single method.
In the mean time, this is a hack to make our code more readable.
i.e. I know what `_.defaults` means intuitively, but I have to look
up `_.partialRight` every time.

To get the latest status, see the [original issue in the lodash repo](https://github.com/lodash/lodash/issues/154#issuecomment-32140379).

I'll update this repo with install/version info if something comparable is
added to lodash core at some point.



## License

MIT © Mike McNeil 2014