symphony-integration-commons
Version:
Common components for 3rd party developers build the user facing application for Symphony Integrations.
28 lines (25 loc) • 765 B
JavaScript
/*
* initEnrichers initialize enrichers
* @params enrichers array of Enrichers to be initialized
* @return list of service names
*/
export const initEnrichers = (enrichers) => {
if (enrichers !== undefined) {
enrichers.forEach((enricher) => {
enricher.init();
});
return enrichers.map((enricher) => enricher.name);
}
return [];
};
/*
* registerEnrichers register enrichers on symphony client
* @params enrichers array of Enrichers to be registered in the application
*/
export const registerEnrichers = (enrichers) => {
if (enrichers !== undefined) {
enrichers.forEach((enricher) => {
enricher.register();
});
}
};