getPrefixedName = function (name, type) {
    // Don't add 'plugin' prefix for default type
    if (type == 'plugin') return name;
    // If the name is already prefixed, just return the name.
    if (name.startsWith(`${type}-`)) return name;
    // Add the prefix if not already present.
    return `${type}-${name}`;
  }
Gets the name of the plugin prefixed with the type.
Default to the plugin name if the type=plugin, otherwise use [type]-[name].
@param {string} name Plugin name.
@param {string} type Plugin type.
@returns {string} Plugin name prefixed with type.