parcoursup/node_modules/riot/esm/core/run-plugins.js
lalBi94 7bc56c09b5 $
2023-03-05 13:23:23 +01:00

15 lines
391 B
JavaScript

/* 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 };