{"_id":"svgo-browser","_rev":"4423918","name":"svgo-browser","description":"svgo tool for browser and node usage","dist-tags":{"latest":"1.3.8"},"maintainers":[{"name":"rtivital","email":"rtivital@gmail.com"}],"time":{"modified":"2026-04-08T13:48:56.000Z","created":"2020-08-12T21:12:58.385Z","1.3.8":"2020-10-23T13:05:48.949Z","1.3.7":"2020-08-13T14:19:23.882Z","1.3.6":"2020-08-13T08:48:57.595Z","1.3.5":"2020-08-13T08:38:41.270Z","1.3.4":"2020-08-13T08:09:38.482Z","1.3.3":"2020-08-13T07:38:34.449Z","1.3.2":"2020-08-12T21:12:58.385Z"},"users":{},"author":{"name":"Kir Belevich","email":"kir@belevi.ch","url":"https://github.com/deepsweet"},"repository":{"type":"git","url":"git+https://github.com/rtivital/svgo-browser.git"},"versions":{"1.3.8":{"name":"svgo-browser","version":"1.3.8","description":"svgo tool for browser and node usage","keywords":["svgo","svg","optimize","minify"],"homepage":"https://github.com/rtivital/svgo-browser","bugs":{"url":"https://github.com/rtivital/svgo-browser/issues"},"author":{"name":"Kir Belevich","email":"kir@belevi.ch","url":"https://github.com/deepsweet"},"contributors":[{"name":"Sergey Belov","email":"peimei@ya.ru","url":"http://github.com/arikon"},{"name":"Lev Solntsev","email":"lev.sun@ya.ru","url":"http://github.com/GreLI"}],"repository":{"type":"git","url":"git+https://github.com/rtivital/svgo-browser.git"},"main":"./lib/svgo.js","bin":{"svgo":"bin/svgo"},"directories":{"bin":"./bin","lib":"./lib","example":"./examples"},"scripts":{"test":"set NODE_ENV=test && mocha","lint":"eslint ."},"dependencies":{"chalk":"^2.4.1","coa":"^2.0.2","css-select":"^2.0.0","css-select-base-adapter":"^0.1.1","css-tree":"1.0.0-alpha.37","csso":"^4.0.2","js-yaml":"^3.13.1","mkdirp":"~0.5.1","sax":"~1.2.4","stable":"^0.1.8","unquote":"~1.1.1","util.promisify":"~1.0.0"},"devDependencies":{"coveralls":"^3.0.7","eslint":"^7.6.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.0","fs-extra":"~8.1.0","istanbul":"~0.4.5","mocha":"~6.2.2","mocha-istanbul":"~0.3.0","mock-stdin":"~0.3.1","should":"~13.2.3"},"engines":{"node":">=4.0.0"},"license":"MIT","gitHead":"e2061a9c59d659fe47f7a7d324efe14eed9e2699","_id":"svgo-browser@1.3.8","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","dist":{"shasum":"e90c75ebf74a7f052ca9841d9a34044e40f4f65c","size":87911,"noattachment":false,"key":"/svgo-browser/-/svgo-browser-1.3.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/svgo-browser/download/svgo-browser-1.3.8.tgz"},"maintainers":[{"name":"rtivital","email":"rtivital@gmail.com"}],"_npmUser":{"name":"rtivital","email":"rtivital@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svgo-browser_1.3.8_1603458348727_0.37814164050415666"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T17:07:38.962Z","publish_time":1603458348949,"_cnpm_publish_time":1603458348949},"1.3.7":{"name":"svgo-browser","version":"1.3.7","description":"svgo tool for browser and node usage","keywords":["svgo","svg","optimize","minify"],"homepage":"https://github.com/rtivital/svgo-browser","bugs":{"url":"https://github.com/rtivital/svgo-browser/issues"},"author":{"name":"Kir Belevich","email":"kir@belevi.ch","url":"https://github.com/deepsweet"},"contributors":[{"name":"Sergey Belov","email":"peimei@ya.ru","url":"http://github.com/arikon"},{"name":"Lev Solntsev","email":"lev.sun@ya.ru","url":"http://github.com/GreLI"}],"repository":{"type":"git","url":"git+https://github.com/rtivital/svgo-browser.git"},"main":"./lib/svgo.js","bin":{"svgo":"./bin/svgo"},"directories":{"bin":"./bin","lib":"./lib","example":"./examples"},"scripts":{"test":"set NODE_ENV=test && mocha","lint":"eslint ."},"dependencies":{"chalk":"^2.4.1","coa":"^2.0.2","css-select":"^2.0.0","css-select-base-adapter":"^0.1.1","css-tree":"1.0.0-alpha.37","csso":"^4.0.2","js-yaml":"^3.13.1","mkdirp":"~0.5.1","sax":"~1.2.4","stable":"^0.1.8","unquote":"~1.1.1","util.promisify":"~1.0.0"},"devDependencies":{"coveralls":"^3.0.7","eslint":"^7.6.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.0","fs-extra":"~8.1.0","istanbul":"~0.4.5","mocha":"~6.2.2","mocha-istanbul":"~0.3.0","mock-stdin":"~0.3.1","should":"~13.2.3"},"engines":{"node":">=4.0.0"},"license":"MIT","gitHead":"926925d1c8795de3366e9c1211899d3b14c63f79","_id":"svgo-browser@1.3.7","_npmVersion":"6.5.0","_nodeVersion":"10.14.1","_npmUser":{"name":"rtivital","email":"rtivital@gmail.com"},"dist":{"shasum":"7edd786c2cd8ab3f7de72ca72991fb23267379ea","size":87339,"noattachment":false,"key":"/svgo-browser/-/svgo-browser-1.3.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/svgo-browser/download/svgo-browser-1.3.7.tgz"},"maintainers":[{"name":"rtivital","email":"rtivital@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svgo-browser_1.3.7_1597328363728_0.5269034719995889"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T17:07:37.576Z","publish_time":1597328363882,"_cnpm_publish_time":1597328363882},"1.3.6":{"name":"svgo-browser","version":"1.3.6","description":"svgo tool for browser and node usage","keywords":["svgo","svg","optimize","minify"],"homepage":"https://github.com/rtivital/svgo-browser","bugs":{"url":"https://github.com/rtivital/svgo-browser/issues"},"author":{"name":"Kir Belevich","email":"kir@belevi.ch","url":"https://github.com/deepsweet"},"contributors":[{"name":"Sergey Belov","email":"peimei@ya.ru","url":"http://github.com/arikon"},{"name":"Lev Solntsev","email":"lev.sun@ya.ru","url":"http://github.com/GreLI"}],"repository":{"type":"git","url":"git+https://github.com/rtivital/svgo-browser.git"},"main":"./lib/svgo.js","bin":{"svgo":"./bin/svgo"},"directories":{"bin":"./bin","lib":"./lib","example":"./examples"},"scripts":{"test":"set NODE_ENV=test && mocha","lint":"eslint ."},"dependencies":{"chalk":"^2.4.1","coa":"^2.0.2","css-select":"^2.0.0","css-select-base-adapter":"^0.1.1","css-tree":"1.0.0-alpha.37","csso":"^4.0.2","js-yaml":"^3.13.1","mkdirp":"~0.5.1","sax":"~1.2.4","stable":"^0.1.8","unquote":"~1.1.1","util.promisify":"~1.0.0"},"devDependencies":{"coveralls":"^3.0.7","eslint":"^7.6.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.0","fs-extra":"~8.1.0","istanbul":"~0.4.5","mocha":"~6.2.2","mocha-istanbul":"~0.3.0","mock-stdin":"~0.3.1","should":"~13.2.3"},"engines":{"node":">=4.0.0"},"license":"MIT","gitHead":"7c4af52f025499f367d1b5405948dea23988879d","_id":"svgo-browser@1.3.6","_npmVersion":"6.5.0","_nodeVersion":"10.14.1","_npmUser":{"name":"rtivital","email":"rtivital@gmail.com"},"dist":{"shasum":"fe8f123edab58ba420c659505c91d89497a57757","size":87335,"noattachment":false,"key":"/svgo-browser/-/svgo-browser-1.3.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/svgo-browser/download/svgo-browser-1.3.6.tgz"},"maintainers":[{"name":"rtivital","email":"rtivital@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svgo-browser_1.3.6_1597308537492_0.5677994486468945"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T17:07:36.264Z","publish_time":1597308537595,"_cnpm_publish_time":1597308537595},"1.3.5":{"name":"svgo-browser","version":"1.3.5","description":"svgo tool for browser and node usage","keywords":["svgo","svg","optimize","minify"],"homepage":"https://github.com/svg/svgo","bugs":{"url":"https://github.com/svg/svgo/issues"},"author":{"name":"Kir Belevich","email":"kir@belevi.ch","url":"https://github.com/deepsweet"},"contributors":[{"name":"Sergey Belov","email":"peimei@ya.ru","url":"http://github.com/arikon"},{"name":"Lev Solntsev","email":"lev.sun@ya.ru","url":"http://github.com/GreLI"}],"repository":{"type":"git","url":"git://github.com/svg/svgo.git"},"main":"./lib/svgo.js","bin":{"svgo":"./bin/svgo"},"directories":{"bin":"./bin","lib":"./lib","example":"./examples"},"scripts":{"test":"set NODE_ENV=test && mocha","lint":"eslint lib"},"dependencies":{"chalk":"^2.4.1","coa":"^2.0.2","css-select":"^2.0.0","css-select-base-adapter":"^0.1.1","css-tree":"1.0.0-alpha.37","csso":"^4.0.2","js-yaml":"^3.13.1","mkdirp":"~0.5.1","sax":"~1.2.4","stable":"^0.1.8","unquote":"~1.1.1","util.promisify":"~1.0.0"},"devDependencies":{"coveralls":"^3.0.7","eslint":"^7.6.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.0","fs-extra":"~8.1.0","istanbul":"~0.4.5","mocha":"~6.2.2","mocha-istanbul":"~0.3.0","mock-stdin":"~0.3.1","should":"~13.2.3"},"engines":{"node":">=4.0.0"},"license":"MIT","gitHead":"0554a807104598454a1ca7bd450d96d066e2a89b","_id":"svgo-browser@1.3.5","_npmVersion":"6.5.0","_nodeVersion":"10.14.1","_npmUser":{"name":"rtivital","email":"rtivital@gmail.com"},"dist":{"shasum":"534b9576e2b88b511d4b0becbf37d8fca23faea4","size":87317,"noattachment":false,"key":"/svgo-browser/-/svgo-browser-1.3.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/svgo-browser/download/svgo-browser-1.3.5.tgz"},"maintainers":[{"name":"rtivital","email":"rtivital@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svgo-browser_1.3.5_1597307921175_0.4416036171045057"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T17:07:34.874Z","publish_time":1597307921270,"_cnpm_publish_time":1597307921270},"1.3.4":{"name":"svgo-browser","version":"1.3.4","description":"svgo tool for browser and node usage","keywords":["svgo","svg","optimize","minify"],"homepage":"https://github.com/svg/svgo","bugs":{"url":"https://github.com/svg/svgo/issues"},"author":{"name":"Kir Belevich","email":"kir@belevi.ch","url":"https://github.com/deepsweet"},"contributors":[{"name":"Sergey Belov","email":"peimei@ya.ru","url":"http://github.com/arikon"},{"name":"Lev Solntsev","email":"lev.sun@ya.ru","url":"http://github.com/GreLI"}],"repository":{"type":"git","url":"git://github.com/svg/svgo.git"},"main":"./lib/svgo.js","bin":{"svgo":"./bin/svgo"},"directories":{"bin":"./bin","lib":"./lib","example":"./examples"},"scripts":{"test":"set NODE_ENV=test && mocha","lint":"eslint lib"},"dependencies":{"chalk":"^2.4.1","coa":"^2.0.2","css-select":"^2.0.0","css-select-base-adapter":"^0.1.1","css-tree":"1.0.0-alpha.37","csso":"^4.0.2","js-yaml":"^3.13.1","mkdirp":"~0.5.1","sax":"~1.2.4","stable":"^0.1.8","unquote":"~1.1.1","util.promisify":"~1.0.0"},"devDependencies":{"coveralls":"^3.0.7","eslint":"^7.6.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.0","fs-extra":"~8.1.0","istanbul":"~0.4.5","mocha":"~6.2.2","mocha-istanbul":"~0.3.0","mock-stdin":"~0.3.1","should":"~13.2.3"},"engines":{"node":">=4.0.0"},"license":"MIT","gitHead":"6574cc1f7e530f5400a767bc5028dc44ca6b1796","_id":"svgo-browser@1.3.4","_npmVersion":"6.5.0","_nodeVersion":"10.14.1","_npmUser":{"name":"rtivital","email":"rtivital@gmail.com"},"dist":{"shasum":"7267d1dcd923377b97c2efb293d0450e4686e88a","size":86605,"noattachment":false,"key":"/svgo-browser/-/svgo-browser-1.3.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/svgo-browser/download/svgo-browser-1.3.4.tgz"},"maintainers":[{"name":"rtivital","email":"rtivital@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svgo-browser_1.3.4_1597306178321_0.5807742939570553"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T17:07:33.515Z","publish_time":1597306178482,"_cnpm_publish_time":1597306178482},"1.3.3":{"name":"svgo-browser","version":"1.3.3","description":"svgo tool for browser and node usage","keywords":["svgo","svg","optimize","minify"],"homepage":"https://github.com/svg/svgo","bugs":{"url":"https://github.com/svg/svgo/issues"},"author":{"name":"Kir Belevich","email":"kir@belevi.ch","url":"https://github.com/deepsweet"},"contributors":[{"name":"Sergey Belov","email":"peimei@ya.ru","url":"http://github.com/arikon"},{"name":"Lev Solntsev","email":"lev.sun@ya.ru","url":"http://github.com/GreLI"}],"repository":{"type":"git","url":"git://github.com/svg/svgo.git"},"main":"./lib/svgo.js","bin":{"svgo":"./bin/svgo"},"directories":{"bin":"./bin","lib":"./lib","example":"./examples"},"scripts":{"test":"set NODE_ENV=test && mocha","lint":"eslint lib"},"dependencies":{"chalk":"^2.4.1","coa":"^2.0.2","css-select":"^2.0.0","css-select-base-adapter":"^0.1.1","css-tree":"1.0.0-alpha.37","csso":"^4.0.2","js-yaml":"^3.13.1","mkdirp":"~0.5.1","sax":"~1.2.4","stable":"^0.1.8","unquote":"~1.1.1","util.promisify":"~1.0.0"},"devDependencies":{"coveralls":"^3.0.7","eslint":"^7.6.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.0","fs-extra":"~8.1.0","istanbul":"~0.4.5","mocha":"~6.2.2","mocha-istanbul":"~0.3.0","mock-stdin":"~0.3.1","should":"~13.2.3"},"engines":{"node":">=4.0.0"},"license":"MIT","gitHead":"8b7541cda4af450bf8a458d00dd1c87fe8b0a24e","_id":"svgo-browser@1.3.3","_npmVersion":"6.5.0","_nodeVersion":"10.14.1","_npmUser":{"name":"rtivital","email":"rtivital@gmail.com"},"dist":{"shasum":"cc08f0d584f83fc114f798b8b158a76553b0de12","size":92629,"noattachment":false,"key":"/svgo-browser/-/svgo-browser-1.3.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/svgo-browser/download/svgo-browser-1.3.3.tgz"},"maintainers":[{"name":"rtivital","email":"rtivital@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svgo-browser_1.3.3_1597304314332_0.058402070248832594"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T17:07:32.167Z","publish_time":1597304314449,"_cnpm_publish_time":1597304314449},"1.3.2":{"name":"svgo-browser","version":"1.3.2","description":"svgo tool for browser usage","keywords":["svgo","svg","optimize","minify"],"homepage":"https://github.com/svg/svgo","bugs":{"url":"https://github.com/svg/svgo/issues"},"author":{"name":"Kir Belevich","email":"kir@belevi.ch","url":"https://github.com/deepsweet"},"contributors":[{"name":"Sergey Belov","email":"peimei@ya.ru","url":"http://github.com/arikon"},{"name":"Lev Solntsev","email":"lev.sun@ya.ru","url":"http://github.com/GreLI"}],"repository":{"type":"git","url":"git://github.com/svg/svgo.git"},"main":"./lib/svgo.js","bin":{"svgo":"./bin/svgo"},"directories":{"bin":"./bin","lib":"./lib","example":"./examples"},"scripts":{"test":"set NODE_ENV=test && mocha","lint":"eslint lib"},"dependencies":{"chalk":"^2.4.1","coa":"^2.0.2","css-select":"^2.0.0","css-select-base-adapter":"^0.1.1","css-tree":"1.0.0-alpha.37","csso":"^4.0.2","js-yaml":"^3.13.1","mkdirp":"~0.5.1","sax":"~1.2.4","stable":"^0.1.8","unquote":"~1.1.1","util.promisify":"~1.0.0"},"devDependencies":{"coveralls":"^3.0.7","eslint":"^7.6.0","eslint-config-airbnb-base":"^14.2.0","eslint-plugin-import":"^2.22.0","fs-extra":"~8.1.0","istanbul":"~0.4.5","mocha":"~6.2.2","mocha-istanbul":"~0.3.0","mock-stdin":"~0.3.1","should":"~13.2.3"},"engines":{"node":">=4.0.0"},"license":"MIT","gitHead":"1288edb11758ede9b64ccf26d99cee49002b571e","_id":"svgo-browser@1.3.2","_npmVersion":"6.5.0","_nodeVersion":"10.14.1","_npmUser":{"name":"rtivital","email":"rtivital@gmail.com"},"dist":{"shasum":"57541037f129826352f61278329871a3ac7794c8","size":93782,"noattachment":false,"key":"/svgo-browser/-/svgo-browser-1.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/svgo-browser/download/svgo-browser-1.3.2.tgz"},"maintainers":[{"name":"rtivital","email":"rtivital@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svgo-browser_1.3.2_1597266778243_0.5871483982234162"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-25T17:07:30.793Z","publish_time":1597266778385,"_cnpm_publish_time":1597266778385}},"readme":"# SVGO Browser\n\nThis package is fork of original svgo tool and focused on two things:\n\n- providing support for browser usage\n- better svgo api for node.js interface\n\nThis readme includes documentation only for changes and does not cover original features. To get more information about svgo please refer to [original repository](https://github.com/svg/svgo)\n\n## Installation\n\n```\nnpm install svgo-browser\n\nyarn add svgo-browser\n```\n\n## Usage\n\nsvgo-browser can be used as is with node, but only with build tools (webpack, rollup, parcel, .etc) in browser as it uses node require syntax under the hood. Package includes everything from original svgo plus some extra helpers that can be imported separately.\n\n### Usage with build tool\n\nWas tested to work properly with webpack\n\n```js\n// Test data will be used in all examples to illustrate output\nconst testData = `\n  <svg version=\"1.1\" width=\"10\" height=\"20\">\n      test\n  </svg>\n`;\n```\n\n**Optimize with all default configuration:**\n\n```js\nimport optimize from 'svgo-browser/lib/optimize';\n\noptimize(testData).then(console.log); // -> <svg viewBox=\"0 0 10 20\">test</svg>\n```\n\n**Get separate instance:**\n\n```js\nimport getSvgoInstance from 'svgo-browser/lib/get-svgo-instance';\n\nconst svgo = getSvgoInstance();\nsvgo.optimize(testData).then(console.log); // -> { data: \"<svg viewBox=\"0 0 10 20\">test</svg>\", info: {}}\n```\n\n**Provide plugins to svgo instance:**\n\n```js\nimport getSvgoInstance from 'svgo-browser/lib/get-svgo-instance';\n\n// everything included in default configuration\nconst svgo = getSvgoInstance({\n  cleanupAttrs: true,\n  removeDoctype: true,\n  removeXMLProcInst: true,\n  removeComments: true,\n  removeMetadata: true,\n  removeTitle: true,\n  removeDesc: true,\n  removeUselessDefs: true,\n  removeEditorsNSData: true,\n  removeEmptyAttrs: true,\n  removeHiddenElems: true,\n  removeEmptyText: true,\n  removeEmptyContainers: true,\n  removeViewBox: false,\n  cleanupEnableBackground: true,\n  convertStyleToAttrs: true,\n  convertColors: true,\n  convertPathData: true,\n  convertTransform: true,\n  removeUnknownsAndDefaults: true,\n  removeNonInheritableGroupAttrs: true,\n  removeUselessStrokeAndFill: true,\n  removeUnusedNS: true,\n  cleanupIDs: true,\n  cleanupNumericValues: true,\n  moveElemsAttrsToGroup: true,\n  moveGroupAttrsToElems: true,\n  collapseGroups: true,\n  removeRasterImages: false,\n  mergePaths: true,\n  convertShapeToPath: true,\n  sortAttrs: true,\n  removeDimensions: true,\n  removeAttrs: {\n    attrs: '(stroke|fill)',\n  },\n});\n\nsvgo.optimize(testData).then(console.log); // -> <svg viewBox=\"0 0 10 20\">test</svg>\n```\n","_attachments":{},"homepage":"https://github.com/rtivital/svgo-browser","bugs":{"url":"https://github.com/rtivital/svgo-browser/issues"},"license":"MIT"}