Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

247 B
Raw Blame
// import type { RootContent } from 'mdast'

export function flattenNode(node: any): string {
  if ('children' in node) return node.children.map((child: any) => flattenNode(child)).join('')

  if ('value' in node) return node.value

  return ''
}