const R = require('ramda'); const mergeExistingProps = (target, updater) => { const targetClone = R.clone(target); for (const prop in targetClone) { if (Object.prototype.hasOwnProperty.call(updater, prop)) { targetClone[prop] = updater[prop]; } } return targetClone; }; module.exports = mergeExistingProps;