docs: function convertToText (object) {
    switch (typeof object) {
      case 'string':
        return object
  
      case 'object':
        const attrs = toPairs(object.attrs)
          .map(([name, value]) => `${name}="${value}"`)
  
        const tag = [object.name].concat(attrs)
                                 .join(' ')
  
        const children = object
          .children
          .map(child => convertToText(child))
          .join('')
  
        return `<${tag}>${children}</${object.name}>`
    }
    return '<' + object.name + '>'
  }