New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/svgo

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/svgo - npm Package Compare versions

Comparing version 0.7.0 to 1.0.0

184

svgo/index.d.ts

@@ -1,4 +0,5 @@

// Type definitions for svgo 0.7
// Type definitions for svgo 1.0
// Project: https://github.com/svg/svgo
// Definitions by: Bradley Ayers <https://github.com/bradleyayers>
// Gilad Gray <https://github.com/giladgray>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -8,171 +9,171 @@ // TypeScript Version: 2.2

interface PluginCleanupAttrs {
cleanupAttrs: object;
cleanupAttrs: boolean | object;
}
interface PluginRemoveDoctype {
removeDoctype: object;
removeDoctype: boolean | object;
}
interface PluginRemoveXMLProcInst {
removeXMLProcInst: object;
removeXMLProcInst: boolean | object;
}
interface PluginRemoveComments {
removeComments: object;
removeComments: boolean | object;
}
interface PluginRemoveMetadata {
removeMetadata: object;
removeMetadata: boolean | object;
}
interface PluginRemoveTitle {
removeTitle: object;
removeTitle: boolean | object;
}
interface PluginRemoveDesc {
removeDesc: object;
removeDesc: boolean | object;
}
interface PluginRemoveUselessDefs {
removeUselessDefs: object;
removeUselessDefs: boolean | object;
}
interface PluginRemoveXMLNS {
removeXMLNS: object;
removeXMLNS: boolean | object;
}
interface PluginRemoveEditorsNSData {
removeEditorsNSData: object;
removeEditorsNSData: boolean | object;
}
interface PluginRemoveEmptyAttrs {
removeEmptyAttrs: object;
removeEmptyAttrs: boolean | object;
}
interface PluginRemoveHiddenElems {
removeHiddenElems: object;
removeHiddenElems: boolean | object;
}
interface PluginRemoveEmptyText {
removeEmptyText: object;
removeEmptyText: boolean | object;
}
interface PluginRemoveEmptyContainers {
removeEmptyContainers: object;
removeEmptyContainers: boolean | object;
}
interface PluginRemoveViewBox {
removeViewBox: object;
removeViewBox: boolean | object;
}
interface PluginCleanupEnableBackground {
cleanupEnableBackground: object;
cleanupEnableBackground: boolean | object;
}
interface PluginMinifyStyles {
minifyStyles: object;
minifyStyles: boolean | object;
}
interface PluginConvertStyleToAttrs {
convertStyleToAttrs: object;
convertStyleToAttrs: boolean | object;
}
interface PluginConvertColors {
convertColors: object;
convertColors: boolean | object;
}
interface PluginConvertPathData {
convertPathData: object;
convertPathData: boolean | object;
}
interface PluginConvertTransform {
convertTransform: object;
convertTransform: boolean | object;
}
interface PluginRemoveUnknownsAndDefaults {
removeUnknownsAndDefaults: object;
removeUnknownsAndDefaults: boolean | object;
}
interface PluginRemoveNonInheritableGroupAttrs {
removeNonInheritableGroupAttrs: object;
removeNonInheritableGroupAttrs: boolean | object;
}
interface PluginRemoveUselessStrokeAndFill {
removeUselessStrokeAndFill: object;
removeUselessStrokeAndFill: boolean | object;
}
interface PluginRemoveUnusedNS {
removeUnusedNS: object;
removeUnusedNS: boolean | object;
}
interface PluginCleanupIDs {
cleanupIDs: object;
cleanupIDs: boolean | object;
}
interface PluginCleanupNumericValues {
cleanupNumericValues: object;
cleanupNumericValues: boolean | object;
}
interface PluginCleanupListOfValues {
cleanupListOfValues: object;
cleanupListOfValues: boolean | object;
}
interface PluginMoveElemsAttrsToGroup {
moveElemsAttrsToGroup: object;
moveElemsAttrsToGroup: boolean | object;
}
interface PluginMoveGroupAttrsToElems {
moveGroupAttrsToElems: object;
moveGroupAttrsToElems: boolean | object;
}
interface PluginCollapseGroups {
collapseGroups: object;
collapseGroups: boolean | object;
}
interface PluginRemoveRasterImages {
removeRasterImages: object;
removeRasterImages: boolean | object;
}
interface PluginMergePaths {
mergePaths: object;
mergePaths: boolean | object;
}
interface PluginConvertShapeToPath {
convertShapeToPath: object;
convertShapeToPath: boolean | object;
}
interface PluginSortAttrs {
sortAttrs: object;
sortAttrs: boolean | object;
}
interface PluginTransformsWithOnePath {
transformsWithOnePath: object;
transformsWithOnePath: boolean | object;
}
interface PluginRemoveDimensions {
removeDimensions: object;
removeDimensions: boolean | object;
}
interface PluginRemoveAttrs {
removeAttrs: object;
removeAttrs: boolean | object;
}
interface PluginRemoveElementsByAttr {
removeElementsByAttr: object;
removeElementsByAttr: boolean | object;
}
interface PluginAddClassesToSVGElement {
addClassesToSVGElement: object;
addClassesToSVGElement: boolean | object;
}
interface PluginAddAttributesToSVGElement {
addAttributesToSVGElement: object;
addAttributesToSVGElement: boolean | object;
}
interface PluginRemoveStyleElement {
removeStyleElement: object;
removeStyleElement: boolean | object;
}
interface PluginRemoveScriptElement {
removeScriptElement: object;
removeScriptElement: boolean | object;
}

@@ -225,14 +226,105 @@

interface Js2SvgOptions {
/** @default '<!DOCTYPE' */
doctypeStart?: string;
/** @default '>' */
doctypeEnd?: string;
/** @default '<?' */
procInstStart?: string;
/** @default '?>' */
procInstEnd?: string;
/** @default '<' */
tagOpenStart?: string;
/** @default '>' */
tagOpenEnd?: string;
/** @default '</' */
tagCloseStart?: string;
/** @default '>' */
tagCloseEnd?: string;
/** @default '<' */
tagShortStart?: string;
/** @default '/>' */
tagShortEnd?: string;
/** @default '="' */
attrStart?: string;
/** @default '"' */
attrEnd?: string;
/** @default '<!--' */
commentStart?: string;
/** @default '-->' */
commentEnd?: string;
/** @default '<![CDATA[' */
cdataStart?: string;
/** @default ']]>' */
cdataEnd?: string;
/** @default '' */
textStart?: string;
/** @default '' */
textEnd?: string;
/** @default 4 */
indent?: number;
/** @default /[&'"<>]/g */
regEntities?: RegExp;
/** @default /[&"<>]/g */
regValEntities?: RegExp;
/** @default encodeEntity */
encodeEntity?: (char?: string) => string;
/** @default false */
pretty?: boolean;
/** @default true */
useShortTags?: boolean;
}
interface Svg2JsOptions {
/** @default true */
strict?: boolean;
/** @default false */
trim?: boolean;
/** @default true */
normalize?: boolean;
/** @default true */
lowercase?: boolean;
/** @default true */
xmlns?: boolean;
/** @default true */
position?: boolean;
}
interface Options {
datauri?: string;
/** Output as Data URI string. */
datauri?: "base64" | "enc" | "unenc";
/** Precision of floating point numbers. Will be passed to each plugin that suppors this param. */
floatPrecision?: number;
/** Use full set of plugins. */
full?: boolean;
/** Options for rendering optimized SVG from AST. */
js2svg?: Js2SvgOptions;
/**
* Individual plugin configurations.
* For specific options, see plugin source in https://github.com/svg/svgo/tree/master/plugins.
*/
plugins?: PluginConfig[];
/** Options for parsing original SVG into AST. */
svg2js?: Svg2JsOptions;
}
interface SvgInfo {
path?: string;
}
interface OptimizedSvg {
data: string;
info: object;
}
declare class SVGO {
constructor(options?: Options);
optimize(code: string, callback: (result: any) => void): void;
optimize(svgString: string, info?: SvgInfo): Promise<OptimizedSvg>;
}
export = SVGO;
{
"name": "@types/svgo",
"version": "0.7.0",
"version": "1.0.0",
"description": "TypeScript definitions for svgo",

@@ -11,2 +11,7 @@ "license": "MIT",

"githubUsername": "bradleyayers"
},
{
"name": "Gilad Gray",
"url": "https://github.com/giladgray",
"githubUsername": "giladgray"
}

@@ -21,4 +26,4 @@ ],

"dependencies": {},
"typesPublisherContentHash": "65c0325964c25df81b2bb5571160739335b63a70985f85c488aa567b04cce535",
"typesPublisherContentHash": "6acd1db46edd635aaee12074b798880aed9b1d4afae512f18bb30de2681e7230",
"typeScriptVersion": "2.2"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Mon, 09 Oct 2017 22:38:10 GMT
* Last updated: Wed, 24 Jan 2018 01:25:26 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by Bradley Ayers <https://github.com/bradleyayers>.
These definitions were written by Bradley Ayers <https://github.com/bradleyayers>, Gilad Gray <https://github.com/giladgray>.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc