Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
connections.forEach((connection) => {
const connectionTypes = parseMessageDefinition(connection.messageDefinition);
connectionTypes.forEach(({ name, definitions }, index) => {
// The first definition usually doesn't have an explicit name,
// so we get the name from the connection.
if (index === 0) {
datatypes[connection.type] = definitions;
} else if (name) {
datatypes[name] = definitions;
}
});
});
return datatypes;