17 lines
420 B
JavaScript
17 lines
420 B
JavaScript
/* Riot WIP, @license MIT */
|
|
import { PLUGINS_SET, panic } from '@riotjs/util';
|
|
|
|
/**
|
|
* Uninstall a riot plugin
|
|
* @param {Function} plugin - plugin previously installed
|
|
* @returns {Set} the set containing all the plugins installed
|
|
*/
|
|
|
|
function uninstall(plugin) {
|
|
if (!PLUGINS_SET.has(plugin)) panic('This plugin was never installed');
|
|
PLUGINS_SET.delete(plugin);
|
|
return PLUGINS_SET;
|
|
}
|
|
|
|
export { uninstall };
|