@@ -27,17 +27,17 @@ export const popValues = (data: Record<string, unknown>, keys: string[]): Record
27
27
return source
28
28
}
29
29
30
- export const removeDuplicates = < T > ( array : T [ ] ) : T [ ] => {
31
- const uniqueItems : T [ ] = [ ] ;
30
+ // export const removeDuplicates = <T>(array: T[]): T[] => {
31
+ // const uniqueItems: T[] = [];
32
32
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
+ // }
38
38
39
- return uniqueItems ;
40
- }
39
+ // return uniqueItems;
40
+ // }
41
41
42
42
export const mergeValues = ( value : any , patch : any ) => {
43
43
if ( Array . isArray ( value ) && Array . isArray ( patch ) ) {
@@ -83,11 +83,11 @@ export const createRef = (basePath?: string, pointer?: string): string => {
83
83
}
84
84
}
85
85
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
+ // }
91
91
92
92
export const resolvePointer = ( data : unknown , pointer : string , pointers : string [ ] = [ pointer ] ) : any => {
93
93
if ( ! isObject ( data ) ) { return }
0 commit comments