UNPKG

@kelvininc/ui-components

Version:
7 lines (6 loc) 296 B
import { isArray, mergeWith, unionWith } from "lodash-es"; export const mergeComputePositionConfigs = (config1, config2) => mergeWith({}, config1, config2, (objValue, srcValue) => { if (isArray(objValue)) { return unionWith(srcValue, objValue, (a, b) => a.name === b.name); } });