Skip to content

Instantly share code, notes, and snippets.

View steinathan's full-sized avatar
🌍
Hire me

Nathan (navi) steinathan

🌍
Hire me
View GitHub Profile
// Deep-merges arrays without duplicate values
const mergeCustomizer = (objValue: any, srcValue: any) => {
if (Array.isArray(objValue) && Array.isArray(srcValue)) {
return uniqWith(
[...srcValue, ...objValue],
(a, b) => a === b || isEqual(a, b),
);
}
};