'use strict'; function getRecursiveParameters(entity, property = 'parameters', parameters) { if (entity.parent) { return getRecursiveParameters(entity.parent, property, { ...entity[property], ...parameters }); } return { ...entity[property], ...parameters }; } module.exports = getRecursiveParameters;