react-native-hold-menu-actions 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENCE +21 -0
- package/README.md +38 -0
- package/lib/commonjs/components/backdrop/Backdrop.js +104 -0
- package/lib/commonjs/components/backdrop/Backdrop.js.map +1 -0
- package/lib/commonjs/components/backdrop/constants.js +14 -0
- package/lib/commonjs/components/backdrop/constants.js.map +1 -0
- package/lib/commonjs/components/backdrop/index.js +16 -0
- package/lib/commonjs/components/backdrop/index.js.map +1 -0
- package/lib/commonjs/components/backdrop/styles.js +17 -0
- package/lib/commonjs/components/backdrop/styles.js.map +1 -0
- package/lib/commonjs/components/flatList/FlatList.js +35 -0
- package/lib/commonjs/components/flatList/FlatList.js.map +1 -0
- package/lib/commonjs/components/flatList/index.js +16 -0
- package/lib/commonjs/components/flatList/index.js.map +1 -0
- package/lib/commonjs/components/holdItem/HoldItem.js +369 -0
- package/lib/commonjs/components/holdItem/HoldItem.js.map +1 -0
- package/lib/commonjs/components/holdItem/index.js +16 -0
- package/lib/commonjs/components/holdItem/index.js.map +1 -0
- package/lib/commonjs/components/holdItem/styles.js +22 -0
- package/lib/commonjs/components/holdItem/styles.js.map +1 -0
- package/lib/commonjs/components/holdItem/types.d.js +2 -0
- package/lib/commonjs/components/holdItem/types.d.js.map +1 -0
- package/lib/commonjs/components/icon/Icon.js +43 -0
- package/lib/commonjs/components/icon/Icon.js.map +1 -0
- package/lib/commonjs/components/icon/index.js +16 -0
- package/lib/commonjs/components/icon/index.js.map +1 -0
- package/lib/commonjs/components/menu/Menu.js +57 -0
- package/lib/commonjs/components/menu/Menu.js.map +1 -0
- package/lib/commonjs/components/menu/MenuItem.js +85 -0
- package/lib/commonjs/components/menu/MenuItem.js.map +1 -0
- package/lib/commonjs/components/menu/MenuItems.js +35 -0
- package/lib/commonjs/components/menu/MenuItems.js.map +1 -0
- package/lib/commonjs/components/menu/MenuList.js +121 -0
- package/lib/commonjs/components/menu/MenuList.js.map +1 -0
- package/lib/commonjs/components/menu/Separator.js +47 -0
- package/lib/commonjs/components/menu/Separator.js.map +1 -0
- package/lib/commonjs/components/menu/calculations.js +31 -0
- package/lib/commonjs/components/menu/calculations.js.map +1 -0
- package/lib/commonjs/components/menu/constants.js +21 -0
- package/lib/commonjs/components/menu/constants.js.map +1 -0
- package/lib/commonjs/components/menu/index.js +16 -0
- package/lib/commonjs/components/menu/index.js.map +1 -0
- package/lib/commonjs/components/menu/styles.js +77 -0
- package/lib/commonjs/components/menu/styles.js.map +1 -0
- package/lib/commonjs/components/menu/types.d.js +2 -0
- package/lib/commonjs/components/menu/types.d.js.map +1 -0
- package/lib/commonjs/components/provider/Provider.js +98 -0
- package/lib/commonjs/components/provider/Provider.js.map +1 -0
- package/lib/commonjs/components/provider/index.js +16 -0
- package/lib/commonjs/components/provider/index.js.map +1 -0
- package/lib/commonjs/components/provider/reducer.js +50 -0
- package/lib/commonjs/components/provider/reducer.js.map +1 -0
- package/lib/commonjs/components/provider/types.d.js +2 -0
- package/lib/commonjs/components/provider/types.d.js.map +1 -0
- package/lib/commonjs/constants.js +60 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/context/index.js +14 -0
- package/lib/commonjs/context/index.js.map +1 -0
- package/lib/commonjs/context/internal.js +13 -0
- package/lib/commonjs/context/internal.js.map +1 -0
- package/lib/commonjs/hooks/index.js +24 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/useDeviceOrientation.js +38 -0
- package/lib/commonjs/hooks/useDeviceOrientation.js.map +1 -0
- package/lib/commonjs/hooks/useInternal.js +15 -0
- package/lib/commonjs/hooks/useInternal.js.map +1 -0
- package/lib/commonjs/index.js +40 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/styleGuide.js +39 -0
- package/lib/commonjs/styleGuide.js.map +1 -0
- package/lib/commonjs/utils/calculations.js +73 -0
- package/lib/commonjs/utils/calculations.js.map +1 -0
- package/lib/commonjs/utils/validations.js +43 -0
- package/lib/commonjs/utils/validations.js.map +1 -0
- package/lib/module/components/backdrop/Backdrop.js +83 -0
- package/lib/module/components/backdrop/Backdrop.js.map +1 -0
- package/lib/module/components/backdrop/constants.js +4 -0
- package/lib/module/components/backdrop/constants.js.map +1 -0
- package/lib/module/components/backdrop/index.js +2 -0
- package/lib/module/components/backdrop/index.js.map +1 -0
- package/lib/module/components/backdrop/styles.js +7 -0
- package/lib/module/components/backdrop/styles.js.map +1 -0
- package/lib/module/components/flatList/FlatList.js +17 -0
- package/lib/module/components/flatList/FlatList.js.map +1 -0
- package/lib/module/components/flatList/index.js +2 -0
- package/lib/module/components/flatList/index.js.map +1 -0
- package/lib/module/components/holdItem/HoldItem.js +344 -0
- package/lib/module/components/holdItem/HoldItem.js.map +1 -0
- package/lib/module/components/holdItem/index.js +2 -0
- package/lib/module/components/holdItem/index.js.map +1 -0
- package/lib/module/components/holdItem/styles.js +12 -0
- package/lib/module/components/holdItem/styles.js.map +1 -0
- package/lib/module/components/holdItem/types.d.js +2 -0
- package/lib/module/components/holdItem/types.d.js.map +1 -0
- package/lib/module/components/icon/Icon.js +26 -0
- package/lib/module/components/icon/Icon.js.map +1 -0
- package/lib/module/components/icon/index.js +2 -0
- package/lib/module/components/icon/index.js.map +1 -0
- package/lib/module/components/menu/Menu.js +37 -0
- package/lib/module/components/menu/Menu.js.map +1 -0
- package/lib/module/components/menu/MenuItem.js +59 -0
- package/lib/module/components/menu/MenuItem.js.map +1 -0
- package/lib/module/components/menu/MenuItems.js +19 -0
- package/lib/module/components/menu/MenuItems.js.map +1 -0
- package/lib/module/components/menu/MenuList.js +93 -0
- package/lib/module/components/menu/MenuList.js.map +1 -0
- package/lib/module/components/menu/Separator.js +29 -0
- package/lib/module/components/menu/Separator.js.map +1 -0
- package/lib/module/components/menu/calculations.js +17 -0
- package/lib/module/components/menu/calculations.js.map +1 -0
- package/lib/module/components/menu/constants.js +8 -0
- package/lib/module/components/menu/constants.js.map +1 -0
- package/lib/module/components/menu/index.js +2 -0
- package/lib/module/components/menu/index.js.map +1 -0
- package/lib/module/components/menu/styles.js +63 -0
- package/lib/module/components/menu/styles.js.map +1 -0
- package/lib/module/components/menu/types.d.js +2 -0
- package/lib/module/components/menu/types.d.js.map +1 -0
- package/lib/module/components/provider/Provider.js +75 -0
- package/lib/module/components/provider/Provider.js.map +1 -0
- package/lib/module/components/provider/index.js +2 -0
- package/lib/module/components/provider/index.js.map +1 -0
- package/lib/module/components/provider/reducer.js +38 -0
- package/lib/module/components/provider/reducer.js.map +1 -0
- package/lib/module/components/provider/types.d.js +2 -0
- package/lib/module/components/provider/types.d.js.map +1 -0
- package/lib/module/constants.js +37 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/context/index.js +2 -0
- package/lib/module/context/index.js.map +1 -0
- package/lib/module/context/internal.js +4 -0
- package/lib/module/context/internal.js.map +1 -0
- package/lib/module/hooks/index.js +3 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useDeviceOrientation.js +27 -0
- package/lib/module/hooks/useDeviceOrientation.js.map +1 -0
- package/lib/module/hooks/useInternal.js +4 -0
- package/lib/module/hooks/useInternal.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/styleGuide.js +30 -0
- package/lib/module/styleGuide.js.map +1 -0
- package/lib/module/utils/calculations.js +51 -0
- package/lib/module/utils/calculations.js.map +1 -0
- package/lib/module/utils/validations.js +38 -0
- package/lib/module/utils/validations.js.map +1 -0
- package/lib/typescript/components/backdrop/Backdrop.d.ts +3 -0
- package/lib/typescript/components/backdrop/constants.d.ts +2 -0
- package/lib/typescript/components/backdrop/index.d.ts +1 -0
- package/lib/typescript/components/backdrop/styles.d.ts +10 -0
- package/lib/typescript/components/flatList/FlatList.d.ts +5 -0
- package/lib/typescript/components/flatList/index.d.ts +2 -0
- package/lib/typescript/components/holdItem/HoldItem.d.ts +4 -0
- package/lib/typescript/components/holdItem/index.d.ts +2 -0
- package/lib/typescript/components/holdItem/styles.d.ts +15 -0
- package/lib/typescript/components/holdItem/types.d.ts +131 -0
- package/lib/typescript/components/icon/Icon.d.ts +7 -0
- package/lib/typescript/components/icon/index.d.ts +1 -0
- package/lib/typescript/components/menu/Menu.d.ts +3 -0
- package/lib/typescript/components/menu/MenuItem.d.ts +8 -0
- package/lib/typescript/components/menu/MenuItems.d.ts +6 -0
- package/lib/typescript/components/menu/MenuList.d.ts +3 -0
- package/lib/typescript/components/menu/Separator.d.ts +3 -0
- package/lib/typescript/components/menu/calculations.d.ts +4 -0
- package/lib/typescript/components/menu/constants.d.ts +7 -0
- package/lib/typescript/components/menu/index.d.ts +1 -0
- package/lib/typescript/components/menu/styles.d.ts +59 -0
- package/lib/typescript/components/menu/types.d.ts +28 -0
- package/lib/typescript/components/provider/Provider.d.ts +10 -0
- package/lib/typescript/components/provider/index.d.ts +2 -0
- package/lib/typescript/components/provider/reducer.d.ts +20 -0
- package/lib/typescript/components/provider/types.d.ts +33 -0
- package/lib/typescript/constants.d.ts +29 -0
- package/lib/typescript/context/index.d.ts +1 -0
- package/lib/typescript/context/internal.d.ts +16 -0
- package/lib/typescript/hooks/index.d.ts +2 -0
- package/lib/typescript/hooks/useDeviceOrientation.d.ts +3 -0
- package/lib/typescript/hooks/useInternal.d.ts +1 -0
- package/lib/typescript/index.d.ts +4 -0
- package/lib/typescript/styleGuide.d.ts +28 -0
- package/lib/typescript/utils/calculations.d.ts +14 -0
- package/lib/typescript/utils/validations.d.ts +3 -0
- package/package.json +106 -0
- package/src/components/backdrop/Backdrop.tsx +138 -0
- package/src/components/backdrop/constants.ts +8 -0
- package/src/components/backdrop/index.ts +1 -0
- package/src/components/backdrop/styles.ts +8 -0
- package/src/components/flatList/FlatList.tsx +23 -0
- package/src/components/flatList/index.ts +2 -0
- package/src/components/holdItem/HoldItem.tsx +449 -0
- package/src/components/holdItem/index.ts +2 -0
- package/src/components/holdItem/styles.ts +11 -0
- package/src/components/holdItem/types.d.ts +131 -0
- package/src/components/icon/Icon.tsx +33 -0
- package/src/components/icon/index.ts +1 -0
- package/src/components/menu/Menu.tsx +57 -0
- package/src/components/menu/MenuItem.tsx +79 -0
- package/src/components/menu/MenuItems.tsx +26 -0
- package/src/components/menu/MenuList.tsx +151 -0
- package/src/components/menu/Separator.tsx +28 -0
- package/src/components/menu/calculations.ts +49 -0
- package/src/components/menu/constants.ts +9 -0
- package/src/components/menu/index.ts +1 -0
- package/src/components/menu/styles.ts +64 -0
- package/src/components/menu/types.d.ts +28 -0
- package/src/components/provider/Provider.tsx +105 -0
- package/src/components/provider/index.ts +2 -0
- package/src/components/provider/reducer.ts +48 -0
- package/src/components/provider/types.d.ts +33 -0
- package/src/constants.ts +54 -0
- package/src/context/index.ts +1 -0
- package/src/context/internal.ts +19 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useDeviceOrientation.ts +28 -0
- package/src/hooks/useInternal.ts +4 -0
- package/src/index.ts +4 -0
- package/src/styleGuide.ts +31 -0
- package/src/utils/calculations.ts +110 -0
- package/src/utils/validations.ts +42 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
import type Animated from 'react-native-reanimated';
|
|
3
|
+
import type { CONTEXT_MENU_STATE } from '../constants';
|
|
4
|
+
import { MenuInternalProps } from '../components/menu/types';
|
|
5
|
+
|
|
6
|
+
export type InternalContextType = {
|
|
7
|
+
state: Animated.SharedValue<CONTEXT_MENU_STATE>;
|
|
8
|
+
theme: Animated.SharedValue<'light' | 'dark'>;
|
|
9
|
+
menuProps: Animated.SharedValue<MenuInternalProps>;
|
|
10
|
+
safeAreaInsets?: {
|
|
11
|
+
top: number;
|
|
12
|
+
right: number;
|
|
13
|
+
bottom: number;
|
|
14
|
+
left: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
export const InternalContext = createContext<InternalContextType>();
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import { Dimensions } from 'react-native';
|
|
3
|
+
|
|
4
|
+
type Orientation = 'landscape' | 'portrait';
|
|
5
|
+
|
|
6
|
+
function getWindowOrientation(): Orientation {
|
|
7
|
+
const { width, height } = Dimensions.get('window');
|
|
8
|
+
return height >= width ? 'portrait' : 'landscape';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function useDeviceOrientation() {
|
|
12
|
+
const [deviceOrientation, setDeviceOrientation] = useState<Orientation>(
|
|
13
|
+
getWindowOrientation()
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
function updateState() {
|
|
18
|
+
setDeviceOrientation(getWindowOrientation());
|
|
19
|
+
}
|
|
20
|
+
const changeEvent = Dimensions.addEventListener('change', updateState);
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
return () => changeEvent.remove();
|
|
23
|
+
}, []);
|
|
24
|
+
|
|
25
|
+
return deviceOrientation;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default useDeviceOrientation;
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Dimensions } from 'react-native';
|
|
2
|
+
|
|
3
|
+
const styleGuide = {
|
|
4
|
+
spacing: 8,
|
|
5
|
+
dimensionWidth: Dimensions.get('screen').width,
|
|
6
|
+
dimensionHeight: Dimensions.get('screen').height,
|
|
7
|
+
palette: {
|
|
8
|
+
primary: '#0072ff',
|
|
9
|
+
secondary: '#e2e2e2',
|
|
10
|
+
common: {
|
|
11
|
+
white: '#fff',
|
|
12
|
+
black: '#000',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
typography: {
|
|
16
|
+
body: {
|
|
17
|
+
fontSize: 17,
|
|
18
|
+
lineHeight: 20,
|
|
19
|
+
},
|
|
20
|
+
callout: {
|
|
21
|
+
fontSize: 16,
|
|
22
|
+
lineHeight: 20,
|
|
23
|
+
},
|
|
24
|
+
callout2: {
|
|
25
|
+
fontSize: 14,
|
|
26
|
+
lineHeight: 18,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default styleGuide;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import styleGuide from '../styleGuide';
|
|
2
|
+
import {
|
|
3
|
+
MENU_WIDTH,
|
|
4
|
+
MENU_TRANSFORM_ORIGIN_TOLERENCE,
|
|
5
|
+
FONT_SCALE,
|
|
6
|
+
} from '../constants';
|
|
7
|
+
|
|
8
|
+
export const MenuItemHeight = () => {
|
|
9
|
+
'worklet';
|
|
10
|
+
return (
|
|
11
|
+
styleGuide.typography.callout.lineHeight * FONT_SCALE +
|
|
12
|
+
styleGuide.spacing * 2.5
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const calculateMenuHeight = (
|
|
17
|
+
itemLength: number,
|
|
18
|
+
separatorCount: number
|
|
19
|
+
) => {
|
|
20
|
+
'worklet';
|
|
21
|
+
return (
|
|
22
|
+
MenuItemHeight() * itemLength +
|
|
23
|
+
(itemLength - 1) +
|
|
24
|
+
separatorCount * styleGuide.spacing
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type TransformOriginAnchorPosition =
|
|
29
|
+
| 'top-right'
|
|
30
|
+
| 'top-left'
|
|
31
|
+
| 'top-center'
|
|
32
|
+
| 'bottom-right'
|
|
33
|
+
| 'bottom-left'
|
|
34
|
+
| 'bottom-center';
|
|
35
|
+
|
|
36
|
+
export const menuAnimationAnchor = (
|
|
37
|
+
anchorPoint: TransformOriginAnchorPosition,
|
|
38
|
+
itemWidth: number,
|
|
39
|
+
itemLength: number,
|
|
40
|
+
itemsWithSeparatorLength: number
|
|
41
|
+
) => {
|
|
42
|
+
'worklet';
|
|
43
|
+
const MenuHeight = calculateMenuHeight(itemLength, itemsWithSeparatorLength);
|
|
44
|
+
const splittetAnchorName: string[] = anchorPoint.split('-');
|
|
45
|
+
|
|
46
|
+
const Center1 = itemWidth;
|
|
47
|
+
const Center2 = 0;
|
|
48
|
+
|
|
49
|
+
const TyTop1 = -(MenuHeight / 2);
|
|
50
|
+
const TyTop2 = MenuHeight / 2;
|
|
51
|
+
|
|
52
|
+
const TxLeft1 = (MENU_WIDTH / 2) * -1;
|
|
53
|
+
const TxLeft2 = (MENU_WIDTH / 2) * 1;
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
beginningTransformations: {
|
|
57
|
+
translateX:
|
|
58
|
+
splittetAnchorName[1] === 'right'
|
|
59
|
+
? -TxLeft1
|
|
60
|
+
: splittetAnchorName[1] === 'left'
|
|
61
|
+
? TxLeft1
|
|
62
|
+
: Center1,
|
|
63
|
+
translateY:
|
|
64
|
+
splittetAnchorName[0] === 'top'
|
|
65
|
+
? TyTop1
|
|
66
|
+
: splittetAnchorName[0] === 'bottom'
|
|
67
|
+
? TyTop1
|
|
68
|
+
: Center2,
|
|
69
|
+
},
|
|
70
|
+
endingTransformations: {
|
|
71
|
+
translateX:
|
|
72
|
+
splittetAnchorName[1] === 'right'
|
|
73
|
+
? -TxLeft2
|
|
74
|
+
: splittetAnchorName[1] === 'left'
|
|
75
|
+
? TxLeft2
|
|
76
|
+
: Center2,
|
|
77
|
+
translateY:
|
|
78
|
+
splittetAnchorName[0] === 'top'
|
|
79
|
+
? TyTop2
|
|
80
|
+
: splittetAnchorName[0] === 'bottom'
|
|
81
|
+
? -TyTop2
|
|
82
|
+
: Center2,
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const getTransformOrigin = (
|
|
88
|
+
posX: number,
|
|
89
|
+
itemWidth: number,
|
|
90
|
+
windowWidth: number,
|
|
91
|
+
bottom?: boolean
|
|
92
|
+
): TransformOriginAnchorPosition => {
|
|
93
|
+
'worklet';
|
|
94
|
+
const distanceToLeft = Math.round(posX + itemWidth / 2);
|
|
95
|
+
const distanceToRight = Math.round(windowWidth - distanceToLeft);
|
|
96
|
+
|
|
97
|
+
let position: TransformOriginAnchorPosition = bottom
|
|
98
|
+
? 'bottom-right'
|
|
99
|
+
: 'top-right';
|
|
100
|
+
|
|
101
|
+
const majority = Math.abs(distanceToLeft - distanceToRight);
|
|
102
|
+
|
|
103
|
+
if (majority < MENU_TRANSFORM_ORIGIN_TOLERENCE) {
|
|
104
|
+
position = bottom ? 'bottom-center' : 'top-center';
|
|
105
|
+
} else if (distanceToLeft < distanceToRight) {
|
|
106
|
+
position = bottom ? 'bottom-left' : 'top-left';
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return position;
|
|
110
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { MenuItemProps } from '../components/menu/types';
|
|
2
|
+
|
|
3
|
+
function fieldAreSame(obj1: MenuItemProps, obj2: MenuItemProps) {
|
|
4
|
+
'worklet';
|
|
5
|
+
|
|
6
|
+
const keys = Object.keys(obj1);
|
|
7
|
+
|
|
8
|
+
return keys.every(key => {
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
const val1 = obj1[key];
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
const val2 = obj2[key];
|
|
13
|
+
|
|
14
|
+
if (val1 !== val2) {
|
|
15
|
+
if (typeof val1 === 'function' && typeof val2 === 'function')
|
|
16
|
+
return val1.toString() === val2.toString();
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return true;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function deepEqual(array1: MenuItemProps[], array2: MenuItemProps[]) {
|
|
25
|
+
'worklet';
|
|
26
|
+
|
|
27
|
+
const areArrays = Array.isArray(array1) && Array.isArray(array2);
|
|
28
|
+
const areSameLength = areArrays && array2 && array1.length === array2.length;
|
|
29
|
+
|
|
30
|
+
if (areArrays && areSameLength && array2) {
|
|
31
|
+
return array1.every((menuItem: MenuItemProps, index) => {
|
|
32
|
+
const obj1 = menuItem;
|
|
33
|
+
const obj2 = array2[index];
|
|
34
|
+
|
|
35
|
+
return fieldAreSame(obj1, obj2);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { deepEqual };
|