Skip to content
On this page

unregisterPlugins()

Tears down previously registered plugins, running each plugin’s optional destroy(). Failures are isolated per plugin, exactly like registration.

Parameter Type Required Description
names string[] ❌ Plugin names to unregister. Omit to unregister them all.
  • Promise<void> - Resolves once all matching plugins have been torn down.
const { unregisterPlugins } = require("simply-xp");
// Tear down one plugin
await unregisterPlugins(["@simply-xp/rate-limits"]);
// ...or all of them, e.g. during a graceful shutdown
await unregisterPlugins();