@graphql-tools/utils
Advanced tools
Comparing version 10.2.1 to 10.2.2-alpha-20240604132826-768b25589d1b501eaba4c3c06bfae6d3b33ce0c9
@@ -11,2 +11,9 @@ "use strict"; | ||
} | ||
if (Array.isArray(target)) { | ||
// Are they all arrays with the same length? | ||
const allArrays = sources.every(source => Array.isArray(source) && source.length === target.length); | ||
if (allArrays) { | ||
return target.map((_, i) => mergeDeep(sources.map(source => source[i]), respectPrototype, respectArrays, respectArrayLength)); | ||
} | ||
} | ||
for (const source of sources) { | ||
@@ -13,0 +20,0 @@ if (isObject(target) && isObject(source)) { |
@@ -8,2 +8,9 @@ import { isSome } from './helpers.js'; | ||
} | ||
if (Array.isArray(target)) { | ||
// Are they all arrays with the same length? | ||
const allArrays = sources.every(source => Array.isArray(source) && source.length === target.length); | ||
if (allArrays) { | ||
return target.map((_, i) => mergeDeep(sources.map(source => source[i]), respectPrototype, respectArrays, respectArrayLength)); | ||
} | ||
} | ||
for (const source of sources) { | ||
@@ -10,0 +17,0 @@ if (isObject(target) && isObject(source)) { |
{ | ||
"name": "@graphql-tools/utils", | ||
"version": "10.2.1", | ||
"version": "10.2.2-alpha-20240604132826-768b25589d1b501eaba4c3c06bfae6d3b33ce0c9", | ||
"description": "Common package containing utils and types for GraphQL tools", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
501234
10847
2