2023-08-17 23:51:01 +00:00
|
|
|
/**
|
|
|
|
* @todo: Add dynamic params support;
|
|
|
|
*
|
|
|
|
* Exp;
|
2023-08-28 21:00:10 +00:00
|
|
|
* usePassThrough(pt1, pt2, pt3, pt*, { mergeSections: true });
|
|
|
|
* usePassThrough(pt1, { mergeSections: true });
|
2023-08-17 23:51:01 +00:00
|
|
|
*/
|
2023-08-28 21:00:10 +00:00
|
|
|
export const usePassThrough = (pt1 = {}, pt2 = {}, { mergeSections = true, mergeProps = false } = {}) => {
|
2023-08-17 23:51:01 +00:00
|
|
|
return {
|
|
|
|
_usept: {
|
2023-08-28 21:00:10 +00:00
|
|
|
mergeSections,
|
|
|
|
mergeProps
|
2023-08-17 23:51:01 +00:00
|
|
|
},
|
|
|
|
originalValue: pt1,
|
2023-08-28 21:00:10 +00:00
|
|
|
value: { ...pt1, ...pt2 }
|
2023-08-17 23:51:01 +00:00
|
|
|
};
|
2023-08-05 01:36:07 +00:00
|
|
|
};
|