astro-ghostcms/.pnpm-store/v3/files/72/dcd89797412ce5ba141f3ecbe13...

21 lines
639 B
Plaintext

import { defaultExtendedIconProps, defaultIconTransformations } from './defaults.mjs';
import { mergeIconTransformations } from './transformations.mjs';
function mergeIconData(parent, child) {
const result = mergeIconTransformations(parent, child);
for (const key in defaultExtendedIconProps) {
if (key in defaultIconTransformations) {
if (key in parent && !(key in result)) {
result[key] = defaultIconTransformations[key];
}
} else if (key in child) {
result[key] = child[key];
} else if (key in parent) {
result[key] = parent[key];
}
}
return result;
}
export { mergeIconData };