7 lines
164 B
JavaScript
7 lines
164 B
JavaScript
function parseTitle(html) {
|
|
const match = html.match(/<title[^>]*>([^<]*)<\/title>/i);
|
|
return match ? match[1].trim() : '';
|
|
}
|
|
|
|
module.exports = { parseTitle };
|