Socket
Socket
Sign inDemoInstall

defaults

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 3.0.0

2

index.js

@@ -50,3 +50,3 @@ // From: https://github.com/sindresorhus/is-plain-obj

export default function defaults(options = {}, defaultOptions = {}) {
return merge({...defaultOptions}, {...options});
return merge(structuredClone(defaultOptions), structuredClone(options));
}
{
"name": "defaults",
"version": "2.0.2",
"version": "3.0.0",
"description": "Easily handle defaults for your options",

@@ -14,3 +14,3 @@ "license": "MIT",

"engines": {
"node": ">=16"
"node": ">=18"
},

@@ -35,6 +35,6 @@ "scripts": {

"devDependencies": {
"ava": "^5.2.0",
"tsd": "^0.28.1",
"xo": "^0.54.0"
"ava": "^5.3.1",
"tsd": "^0.29.0",
"xo": "^0.56.0"
}
}

@@ -39,4 +39,6 @@ # defaults

Deeply merges the given options with the specified defaults.
Deeply merges the given options with the specified defaults and returns a new object.
The given parameters are deep-cloned and never mutated.
#### options

@@ -43,0 +45,0 @@

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