Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const handler = new DomHandler((error, dom) => {
if (error) {
throw error
} else {
const { attribs } = dom[0]
const { viewbox } = attribs
const [width, height] = viewbox.split(/ +/g).slice(2)
assign(attribs, { width, height })
html = `
${getInnerHTML(dom[0])}
`.trim()
}
})
const parser = new Parser(handler)
key=>`${key}=${JSON.stringify(attribs[key])}`).join(' ')
code = `
<svg>${getInnerHTML(dom0)}</svg>
`.trim()
})
const parser = new Parser(handler)
get innerHTML() {
return getInnerHTML(this._dom)
}
get outerHTML() {