🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

svgo-sync

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svgo-sync

a sync version package for svgo

latest
Source
npmnpm
Version
0.5.1
Version published
Weekly downloads
282
-6.31%
Maintainers
1
Weekly downloads
 
Created
Source

english | русский

logo

why make this

svgo use a callback to get the parsed data.

but i just want it tobe synchronous.

how

svgo use sax-js to parse svg,because sax-js is asynchronous,then svgo have to be asynchronous too.

so i just change the sax-js to htmlparser2 which support parse svg synchronous.

use

install:

npm install svgo-sync

just add one more api:

SVGO = require('svgo-sync');
svgo = new SVGO(/*{ custom config object }*/);

// sync version for optimize
var result = svgo.optimizeSync(str);

console.log(result)

Keywords

svgo

FAQs

Package last updated on 17 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts