$
This commit is contained in:
14
node_modules/riot/esm/core/run-plugins.js
generated
vendored
Normal file
14
node_modules/riot/esm/core/run-plugins.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/* 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 };
|
Reference in New Issue
Block a user