Initial Commit
This commit is contained in:
6
server/utils/parseTitle.js
Normal file
6
server/utils/parseTitle.js
Normal file
@@ -0,0 +1,6 @@
|
||||
function parseTitle(html) {
|
||||
const match = html.match(/<title[^>]*>([^<]*)<\/title>/i);
|
||||
return match ? match[1].trim() : '';
|
||||
}
|
||||
|
||||
module.exports = { parseTitle };
|
||||
Reference in New Issue
Block a user