UNPKG

react-native-sortables

Version:

Powerful Sortable Components for Flexible Content Reordering in React Native

36 lines (30 loc) 913 B
"use strict"; export function lt(a, b) { 'worklet'; return a < b; } export function gt(a, b) { 'worklet'; return a > b; } export const areArraysDifferent = (arr1, arr2, areEqual = (a, b) => a === b) => { 'worklet'; return arr1.length !== arr2.length || arr1.some((item, index) => !areEqual(item, arr2[index])); }; export const areDimensionsDifferent = (dim1, dim2, eps) => { 'worklet'; if (eps) { return Math.abs(dim1.width - dim2.width) > eps || Math.abs(dim1.height - dim2.height) > eps; } return dim1.width !== dim2.width || dim1.height !== dim2.height; }; export const haveEqualPropValues = (obj1, obj2) => { 'worklet'; if (!obj1 || !obj2) { return false; } const obj1Keys = Object.keys(obj1); const obj2Keys = Object.keys(obj2); return obj1Keys.length === obj2Keys.length && obj1Keys.every(key => obj1[key] === obj2[key]); }; //# sourceMappingURL=equality.js.map