1.2.4 • Published 4 years ago

path-that-svg v1.2.4

Weekly downloads
691
License
MIT
Repository
github
Last release
4 years ago

Install

yarn add path-that-svg

Usage

String|Buffer svg

const svgToPath = require('path-that-svg')

fs.readFile('./elements.svg', (err, input) => {
  svgToPath(input).then(convertedFromBuffer => {
    console.log({ convertedFromBuffer })
  })
})

svgToPath(`<svg viewBox="0 0 500 200">
  <rect 
    x="200" 
    y="50" 
    fill="#F16362" 
    stroke="#30456B" 
    stroke-width="5" 
    stroke-linecap="round" 
    stroke-linejoin="round" 
    width="100" height="100"/>
</svg>`).then(convertedFromString => console.log({ convertedFromString }))

Related

element-to-path Convert SVG element into path

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago