iconify-cli / applyTemplate
Function: applyTemplate()
applyTemplate(
templateName,template,prefix,icon,collection,svg):string
Defined in: src/lib/template.ts:79
Applies a specified template to the given SVG string with additional metadata.
Parameters
templateName
The name identifier of the template to apply.
"raw" | "svg" | "raw-ts" | "vue"
template
string
The encoded template string to be processed and applied.
prefix
string
The collections prefix (mdi, material-icons)
icon
string
The name of the icon
collection
IconifyInfo
Metadata object describing the collection properties.
svg
string
The SVG string to be processed using the template.
Returns
string
The resulting string after the template has been applied and processed with the SVG and metadata.