# Prop: handsfree.taggedPlugins

Contains a collection of all tagged plugin names by tag. Plugins without tags are stored in handsfree.taggedPlugins.untagged. This is mostly used internally for the handsfree.enablePlugins() and handsfree.disablePlugins() methods but is exposed just incase you need it!

# Example

const handsfree = new Handfree({weboji: true})

handsfree.use('pluginA', {tag: ['tagA']})
handsfree.use('pluginB', {tag: ['tagA', 'tagB']})
handsfree.use('pluginC', {})

Assuming no core plugins are loaded, the above would produce:

handsfree.taggedPlugins == {
  tagA: ['pluginA', 'pluginB'],
  tagB: ['pluginB']
}

You could then do things with the collection of plugins, like so:

// Re-run all plugin onUse() methods
handsfree.taggedPlugins.tagA.forEach((pluginName) => {
  handsfree.plugin[pluginName]?.onUse()
})
Last Updated: 12/21/2020, 4:05:17 PM
Debugger