summaryOf
The first sentence of a definition's documentation.
export const summaryOf = (doc: string | undefined) => doc?.split(/\n\s*\n/)[0]!.replace(/\s+/g, " ").replace(/^(.*?[.!?])\s.*$/, "$1").trim() || undefined
The first sentence of a definition's documentation.
export const summaryOf = (doc: string | undefined) => doc?.split(/\n\s*\n/)[0]!.replace(/\s+/g, " ").replace(/^(.*?[.!?])\s.*$/, "$1").trim() || undefined