Skip to content

Commit 1bdb583

Browse files
committed
refactoring
1 parent d01d881 commit 1bdb583

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/utils.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ export const popValues = (data: Record<string, unknown>, keys: string[]): Record
2727
return source
2828
}
2929

30-
export const removeDuplicates = <T>(array: T[]): T[] => {
31-
const uniqueItems: T[] = [];
30+
// export const removeDuplicates = <T>(array: T[]): T[] => {
31+
// const uniqueItems: T[] = [];
3232

33-
for (const item of array) {
34-
if (!uniqueItems.some((uniqueItem) => isEqual(uniqueItem, item))) {
35-
uniqueItems.push(item);
36-
}
37-
}
33+
// for (const item of array) {
34+
// if (!uniqueItems.some((uniqueItem) => isEqual(uniqueItem, item))) {
35+
// uniqueItems.push(item);
36+
// }
37+
// }
3838

39-
return uniqueItems;
40-
}
39+
// return uniqueItems;
40+
// }
4141

4242
export const mergeValues = (value: any, patch: any) => {
4343
if (Array.isArray(value) && Array.isArray(patch)) {
@@ -83,11 +83,11 @@ export const createRef = (basePath?: string, pointer?: string): string => {
8383
}
8484
}
8585

86-
export const resolveRefNode = (data: any, node: any) => {
87-
const { $ref, ...rest } = node
88-
const _ref = parseRef($ref)
89-
return !_ref.filePath ? resolvePointer(data, _ref.pointer) : undefined
90-
}
86+
// export const resolveRefNode = (data: any, node: any) => {
87+
// const { $ref, ...rest } = node
88+
// const _ref = parseRef($ref)
89+
// return !_ref.filePath ? resolvePointer(data, _ref.pointer) : undefined
90+
// }
9191

9292
export const resolvePointer = (data: unknown, pointer: string, pointers: string[] = [pointer]): any => {
9393
if (!isObject(data)) { return }

0 commit comments

Comments
 (0)