Your IP : 18.117.151.127


Current Path : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/main/core/src/lib/runtime/
Upload File :
Current File : /var/www/www-root/data/www/info.monolith-realty.ru/bitrix/js/main/core/src/lib/runtime/merge.js

import Type from '../type';

export default function merge(current, target)
{
	return Object.entries(target).reduce((acc, [key, value]) => {
		if (
			!Type.isDomNode(acc[key])
			&& Type.isObjectLike(acc[key])
			&& Type.isObjectLike(value)
		)
		{
			acc[key] = merge(acc[key], value);
			return acc;
		}

		acc[key] = value;
		return acc;
	}, current);
}