Function getSvgoPluginOptions

  • The function returns a set of settings for an SVGO plugin based on the input format and plugins. optimizing SVG files. If it is undefined, the function will use a default set of plugins.

    Parameters

    • optionsProvided: string[]

      a string that contains a comma-separated list of settings for configuring the svgo plugin

    Returns SvgoPluginConfig[]

    The function getSvgoPluginOptions returns a string of SVGO plugin settings if the format parameter is .svg, otherwise it returns undefined. The plugins parameter is optional and if it is not provided, the function returns a default set of SVGO plugins for cleaning up SVG attributes, removing doctype, and removing XML processing instructions.