Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fastify/deepmerge

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/deepmerge - npm Package Compare versions

Comparing version 1.3.0 to 2.0.0

11

package.json
{
"name": "@fastify/deepmerge",
"version": "1.3.0",
"version": "2.0.0",
"description": "Merges the enumerable properties of two or more objects deeply.",
"main": "index.js",
"type": "commonjs",
"types": "types/index.d.ts",

@@ -25,6 +26,6 @@ "scripts": {

"devDependencies": {
"standard": "^17.0.0",
"tap": "^16.3.0",
"tape": "^5.6.1",
"tsd": "^0.24.1"
"standard": "^17.1.0",
"tap": "^18.7.1",
"tape": "^5.7.5",
"tsd": "^0.30.7"
},

@@ -31,0 +32,0 @@ "files": [

@@ -64,3 +64,3 @@ # @fastify/deepmerge

The `mergeAray`-Function needs to return the actual Array merging function, which accepts two parameters of type
The `mergeArray`-Function needs to return the actual Array merging function, which accepts two parameters of type
Array, and returns a value.

@@ -161,2 +161,2 @@

Licensed under [MIT](./LICENSE).
Licensed under [MIT](./LICENSE).

@@ -15,7 +15,7 @@ type DeepMergeFn = <T1, T2>(target: T1, source: T2) => DeepMerge<T1, T2>;

type MergeTypes<T, U> = T extends Array<infer A1>
? U extends Array<infer A2>
? Array<A1 | A2>
: T
: U
type MergeArrays<T, U> = T extends readonly any[]
? U extends readonly any[]
? [...T, ...U]
: never
: never

@@ -42,4 +42,4 @@ type DifferenceKeys<

? U
: [T, U] extends [any[], any[]]
? MergeTypes<T, U>
: [T, U] extends [readonly any[], readonly any[]]
? MergeArrays<T, U>
: [T, U] extends [{ [key: string]: unknown }, { [key: string]: unknown }]

@@ -46,0 +46,0 @@ ? DeepMergeHelper<T, U>

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc