UNPKG

ts-webcrawler

Version:

A typescript webcrawler library for downloading and parsing webpages

28 lines (27 loc) 748 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Seo = void 0; const Regex_1 = require("../Constants/Regex"); class Seo { static extractImagesWithoutAlt(html) { if (!html) return []; const matches = html.match(Regex_1.imagesWithoutAlt); if (!matches) return []; return matches.map((match) => { return match; }); } static extractHeadingTags(html) { if (!html) return []; const matches = html.match(Regex_1.headingTags); if (!matches) return []; return matches.map((match) => { return match; }); } } exports.Seo = Seo;