UNPKG

semantic-analysis

Version:

Extensible semantic Structured Data analysis library for Microdata and JSON-LD

22 lines 633 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var jsdom_1 = require("jsdom"); var TheParser = (function () { try { return DOMParser; } catch (e) { return new jsdom_1.JSDOM().window.DOMParser; } })(); var DocumentHandler = /** @class */ (function () { /* Initialization */ function DocumentHandler(source, url) { this.source = source; this.url = url; this.document = new TheParser().parseFromString(source, 'text/html'); } return DocumentHandler; }()); exports.default = DocumentHandler; //# sourceMappingURL=DocumentHandler.js.map