bin/process-svg.js
function setAttrs(svg) {
  const $ = cheerio.load(svg);

  Object.keys(DEFAULT_ATTRS).forEach(key =>
    $('svg').attr(key, DEFAULT_ATTRS[key]),
  );

  return $('body').html();
}
function setAttrs(svg) {
  const $ = cheerio.load(svg);

  Object.keys(DEFAULT_ATTRS).forEach(key =>
    $('svg').attr(key, DEFAULT_ATTRS[key]),
  );

  return $('body').html();
}
function setAttrs ( svg ) { const $ = cheerio . load ( svg ) ; Object . keys ( DEFAULT_ATTRS ) . forEach ( key => $ ( 'svg' ) . attr ( key , DEFAULT_ATTRS [ key ] ) , ) ; return $ ( 'body' ) . html ( ) ; }
Set default attibutes on SVG.
@param {string} svg - An SVG string.
@returns {string}
Set default attibutes on SVG .