stringifyAttributes = (node, config) => {
  let attrs = '';
  for (const [name, value] of Object.entries(node.attributes)) {
    attrs += ' ' + name;

    if (value !== undefined) {
      const encodedValue = value
        .toString()
        .replace(config.regValEntities, config.encodeEntity);
      attrs += config.attrStart + encodedValue + config.attrEnd;
    }
  }
  return attrs;
}
@param {import('./types.js').XastElement} node
@param {Options} config
@returns {string}