- Use domino instead of JSDOM
convert an svg server-side with rough
A simple wrapper that converts SVGs server-side to a more rough version with rough.
$ npm install coarse
So for example, to render an svg with rough:
const fs = require('fs');
const coarse = require('coarse');
const svg = fs.readFileSync('./input.svg');
const roughened = coarse(svg);
fs.writeFileSync('./output.svg', roughened);
Convert an svg server-side with rough
Kind: global function
Returns: string
- The converted svg as a string
Param | Type | Default | Description |
---|---|---|---|
input | string |
An svg string to render with rough | |
[options] | Object |
{} |
Global configuration options for rough |