An open API service indexing awesome lists of open source software.

https://github.com/tutv/svgb

Turn your svg file to buffer.
https://github.com/tutv/svgb

buffer svg

Last synced: 8 months ago
JSON representation

Turn your svg file to buffer.

Awesome Lists containing this project

README

          

# svgb

Generate svg to buffer with template.

### Installation
```
npm install svgb
```

### Example code
```javascript
const svgb = require('svgb')
const path = require('path')

setImmediate(async () => {
const svgFile = path.join(__dirname, 'number.svg')

try {
const artwork = await svgb.toBuffer(svgFile, {number: 1})
console.log(artwork)
} catch (e) {
console.log("ERROR", e)
}
})
```