UNPKG

yoastseo

Version:

Yoast client-side content analysis

33 lines (32 loc) 898 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _SourceCodeLocation = _interopRequireDefault(require("./SourceCodeLocation")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * A text. */ class Text { /** * Creates a new Text object, that consist of some text and a source code range. * * @param {object} textNode The current #text node in the parse5 tree. */ constructor(textNode) { this.name = "#text"; /** * This text's content. * * @type {string} */ this.value = textNode.value; this.sourceCodeRange = new _SourceCodeLocation.default({ startOffset: textNode.sourceCodeLocation.startOffset, endOffset: textNode.sourceCodeLocation.endOffset }); } } var _default = exports.default = Text; //# sourceMappingURL=Text.js.map