mirror of
https://github.com/svg/svgo.git
synced 2025-07-28 09:22:00 +03:00
Add plugin types (#1527)
Covered following plugins - addAttributesToSVGElement.js - addClassesToSVGElement.js - cleanupAttrs.js - convertEllipseToCircle.js - removeAttributesBySelector.js - removeAttrs.js - removeComments.js - removeDesc.js - removeDoctype.js - removeElementsByAttr.js - removeEmptyText.js - removeMetadata.js - removeRasterImages.js - removeScriptElement.js - removeStyleElement.js - removeTitle.js - removeXMLProcInst.js
This commit is contained in:
@ -10,13 +10,13 @@ const DEFAULT_SEPARATOR = ':';
|
||||
/**
|
||||
* Remove attributes
|
||||
*
|
||||
* @param elemSeparator
|
||||
* @example elemSeparator
|
||||
* format: string
|
||||
*
|
||||
* @param preserveCurrentColor
|
||||
* @example preserveCurrentColor
|
||||
* format: boolean
|
||||
*
|
||||
* @param attrs:
|
||||
* @example attrs:
|
||||
*
|
||||
* format: [ element* : attribute* : value* ]
|
||||
*
|
||||
@ -69,6 +69,12 @@ const DEFAULT_SEPARATOR = ':';
|
||||
*
|
||||
*
|
||||
* @author Benny Schudel
|
||||
*
|
||||
* @type {import('../lib/types').Plugin<{
|
||||
* elemSeparator?: string,
|
||||
* preserveCurrentColor?: boolean,
|
||||
* attrs: string | Array<string>
|
||||
* }>}
|
||||
*/
|
||||
exports.fn = (root, params) => {
|
||||
// wrap into an array if params is not
|
||||
|
Reference in New Issue
Block a user