10 lines
229 B
JavaScript
10 lines
229 B
JavaScript
|
module.exports = registerPlugin;
|
||
|
|
||
|
const factory = require("./factory");
|
||
|
|
||
|
function registerPlugin(plugins, pluginFunction) {
|
||
|
return factory(
|
||
|
plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction)
|
||
|
);
|
||
|
}
|