Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function updateProperties({ body, trigger, properties }) {
const targetPath = trigger.options[0].path;
const schema = { key: targetPath.split('.') };
const value = trigger.options[0].type === 'object' ? body : body.data;
return {
properties: mutateValue(properties, schema, value),
};
}