mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 04:11:57 +00:00
chore: Add tests and fix tests. Remove validation for types not seeable
This commit is contained in:
@@ -5,6 +5,7 @@ export function deepMerge(...args: unknown[]): unknown {
|
||||
if (!object.test(lastItem)) return lastItem;
|
||||
const objects = args.filter(object.test).filter((x) => !Array.isArray(x));
|
||||
if (objects.length === 0) return lastItem as any;
|
||||
if (objects.length === 1) objects.unshift({});
|
||||
const allKeys = new Set(objects.flatMap((x) => Object.keys(x)));
|
||||
for (const key of allKeys) {
|
||||
const filteredValues = objects.flatMap((x) =>
|
||||
|
||||
Reference in New Issue
Block a user