summary refs log tree commit diff
path: root/src/util/imports/OrmUtils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/imports/OrmUtils.ts')
-rw-r--r--src/util/imports/OrmUtils.ts22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/util/imports/OrmUtils.ts b/src/util/imports/OrmUtils.ts
index 68a1932c..26652db0 100644
--- a/src/util/imports/OrmUtils.ts
+++ b/src/util/imports/OrmUtils.ts
@@ -9,7 +9,12 @@ export class OrmUtils {
 		return !item.constructor || item.constructor === Object;
 	}
 
-	private static mergeArrayKey(target: any, key: number, value: any, memo: Map<any, any>) {
+	private static mergeArrayKey(
+		target: any,
+		key: number,
+		value: any,
+		memo: Map<any, any>,
+	) {
 		// Have we seen this before?  Prevent infinite recursion.
 		if (memo.has(value)) {
 			target[key] = memo.get(value);
@@ -38,7 +43,12 @@ export class OrmUtils {
 		memo.delete(value);
 	}
 
-	private static mergeObjectKey(target: any, key: string, value: any, memo: Map<any, any>) {
+	private static mergeObjectKey(
+		target: any,
+		key: string,
+		value: any,
+		memo: Map<any, any>,
+	) {
 		// Have we seen this before?  Prevent infinite recursion.
 		if (memo.has(value)) {
 			Object.assign(target, { [key]: memo.get(value) });
@@ -67,7 +77,11 @@ export class OrmUtils {
 		memo.delete(value);
 	}
 
-	private static merge(target: any, source: any, memo: Map<any, any> = new Map()): any {
+	private static merge(
+		target: any,
+		source: any,
+		memo: Map<any, any> = new Map(),
+	): any {
 		if (Array.isArray(target) && Array.isArray(source)) {
 			for (let key = 0; key < source.length; key++) {
 				this.mergeArrayKey(target, key, source[key], memo);
@@ -93,4 +107,4 @@ export class OrmUtils {
 
 		return target;
 	}
-}
\ No newline at end of file
+}