riot
Version:
Simple and elegant component-based UI library
19 lines (14 loc) • 508 B
JavaScript
/* Riot v10.1.2, @license MIT */
import { PLUGINS_SET } from '../dependencies/@riotjs/util/constants.js';
import { panic } from '../dependencies/@riotjs/util/misc.js';
/**
* 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 };