parcoursup/node_modules/riot/esm/core/run-plugins.js

15 lines
391 B
JavaScript
Raw Normal View History

2023-03-05 13:23:23 +01:00
/* Riot WIP, @license MIT */
import { PLUGINS_SET } from '@riotjs/util';
/**
* Run the component instance through all the plugins set by the user
* @param {Object} component - component instance
* @returns {Object} the component enhanced by the plugins
*/
function runPlugins(component) {
return [...PLUGINS_SET].reduce((c, fn) => fn(c) || c, component);
}
export { runPlugins };