UNPKG

kayle

Version:

Extremely fast and accurate accessibility engine built for any headless tool like playwright or puppeteer.

23 lines 674 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fetchHtml = void 0; const https_1 = require("https"); const fetchHtml = (url) => { return new Promise((resolve) => { (0, https_1.get)(url, (res) => { res.setEncoding("utf8"); let rawData = ""; res.on("data", (chunk) => { rawData += chunk; }); res.on("end", () => { resolve(rawData); }); }).on("error", (err) => { console.error(err.message); resolve(""); }); }); }; exports.fetchHtml = fetchHtml; //# sourceMappingURL=fetch.js.map