Provides a `defaults` helper to deeply merge user options with specified default values, returning a new object. Useful for filling in missing option fields (including nested objects) without mutating the inputs, and it includes protections like prototype pollution safeguards.
Project status
- The source is likely still active in the repository (last upstream push on 2026-07-23), but there is a long gap in published version updates since v3.0.0 on 2023-10-18, so released updates appear infrequent as of 2026-08-12.
- Apparent update cadence, based on the provided version history, is roughly yearly or less frequent, with no version updates documented between 2023-10-18 and today.
AI summary generated
Recent updates
v3.0.0
v3.0.0 makes the package require Node.js 18 instead of Node 16, and changes the implementation so that the provided options objects are no longer mutated. The core change is that both defaultOptions and options are deep-cloned before merging.
Breakingv2.0.2
Release v2.0.2 updates the package metadata and focuses on TypeScript typing improvements. The only substantive code change is in the TypeScript declaration file, adjusting how merged types behave when the override value is undefined.
v2.0.1
This release primarily updates package metadata. The version is bumped to 2.0.1 and the package.json repository field is corrected.
v2.0.0
v2.0.0 converts the package to pure ESM, requires Node.js 16, and changes the merge behavior to support deep merging of options and defaults. The implementation also changes cloning semantics (only arrays and plain objects are cloned) and introduces additional merge logic around undefined values and key safety.
BreakingSecurityFeaturesv1.0.4
Release v1.0.4 is a very small update with no functional changes described in the provided release notes. The only stated change is an updated repository reference comparing v1.0.3 to v1.0.4.