UNPKG

generator-begcode

Version:

Spring Boot + Angular/React/Vue in one handy generator

12 lines (11 loc) 492 B
import { GENERATOR_NAME } from './export-utils.js'; export const mergeYoRcContent = (oldConfig, newConfig) => { const merged = { [GENERATOR_NAME]: {} }; for (const ns of new Set([...Object.keys(oldConfig), ...Object.keys(newConfig)])) { merged[ns] = { ...oldConfig[ns], ...newConfig[ns] }; } if (oldConfig[GENERATOR_NAME]?.creationTimestamp) { merged[GENERATOR_NAME].creationTimestamp = oldConfig[GENERATOR_NAME].creationTimestamp; } return merged; };