(content: string)
| 171 | } |
| 172 | |
| 173 | function extractTitleFromMarkdown(content: string) { |
| 174 | const lines = content.split("\n"); |
| 175 | for (let index = 0; index < lines.length; index++) { |
| 176 | const line = lines[index]; |
| 177 | const result = line.match(/#\s(.*)/); |
| 178 | |
| 179 | if (null === result || result.length === 0) { |
| 180 | continue; |
| 181 | } |
| 182 | |
| 183 | return result[1]; |
| 184 | } |
| 185 | |
| 186 | return null; |
| 187 | } |
| 188 | |
| 189 | // export async function getMarkdownStreamTitle(version: string, slug: string[]) { |
| 190 | // const stream = createReadStream( |
nothing calls this directly
no outgoing calls
no test coverage detected