index.js
function createRenderStream(params) {
  return new Transform({
    decodeStrings: params.decodeStrings || false,
    highWaterMark: params.highwaterMark || 16384,
    transform(svgStr, encoding, cb) {
      const renderBuf = Buffer.alloc(params.width * params.height * 4); // ARGB 8-bit per component
      addon.renderSVG(svgStr, renderBuf, params)
        .then(t => {
          renderBuf.timings = t;
          cb(null, renderBuf);
        })
        .catch(cb);
    }
  });
}
function createRenderStream(params) {
  return new Transform({
    decodeStrings: params.decodeStrings || false,
    highWaterMark: params.highwaterMark || 16384,
    transform(svgStr, encoding, cb) {
      const renderBuf = Buffer.alloc(params.width * params.height * 4); // ARGB 8-bit per component
      addon.renderSVG(svgStr, renderBuf, params)
        .then(t => {
          renderBuf.timings = t;
          cb(null, renderBuf);
        })
        .catch(cb);
    }
  });
}
function createRenderStream ( params ) { return new Transform ( { decodeStrings : params . decodeStrings || false , highWaterMark : params . highwaterMark || 16384 , transform ( svgStr , encoding , cb ) { const renderBuf = Buffer . alloc ( params . width * params . height * 4 ) ; // ARGB 8-bit per component addon . renderSVG ( svgStr , renderBuf , params ) . then ( t => { renderBuf . timings = t ; cb ( null , renderBuf ) ; } ) . catch ( cb ) ; } } ) ; }
With no argument, SegfaultHandler will generate a generic log file name
With no argument SegfaultHandler will generate a generic log file name