astro-ghostcms/.pnpm-store/v3/files/ab/8e6d8fed67c43985636ec31780d...

24 lines
612 B
Plaintext
Executable File

const { render: _render, renderAsync: _renderAsync, Resvg: _Resvg } = require('./js-binding.js')
module.exports.render = function render(svg, options) {
if (options) {
return _render(svg, JSON.stringify(options))
}
return _render(svg)
}
module.exports.renderAsync = function renderAsync(svg, options, signal) {
if (options) {
return _renderAsync(svg, JSON.stringify(options), signal)
}
return _renderAsync(svg, null, signal)
}
module.exports.Resvg = class Resvg extends _Resvg {
constructor(svg, options) {
super(svg, JSON.stringify(options))
}
}
// module.exports.Resvg = _Resvg