UNPKG

@configurator/ravendb

Version:
31 lines 919 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Highlightings = void 0; class Highlightings { constructor(fieldName) { this._fieldName = fieldName; this._highlightings = new Map(); } get fieldName() { return this._fieldName; } get resultIndents() { return Object.keys(this._highlightings); } getFragments(key) { const result = this._highlightings.get(key); return result || []; } update(highlightings) { this._highlightings.clear(); if (!highlightings || !(this._fieldName in highlightings)) { return; } const result = highlightings[this._fieldName]; for (const key of Object.keys(result)) { this._highlightings.set(key, result[key]); } } } exports.Highlightings = Highlightings; //# sourceMappingURL=Hightlightings.js.map