UNPKG

text-manipulation

Version:

A NPM library that assists in text range manipulation

42 lines (41 loc) 1.27 kB
"use strict"; var __read = (this && this.__read) || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; Object.defineProperty(exports, "__esModule", { value: true }); var ImmutableTextRange = /** @class */ (function () { function ImmutableTextRange(interval) { var _a = __read(interval, 2), start = _a[0], end = _a[1]; this._start = start; this._end = end; } Object.defineProperty(ImmutableTextRange.prototype, "start", { get: function () { return this._start; }, enumerable: true, configurable: true }); Object.defineProperty(ImmutableTextRange.prototype, "end", { get: function () { return this._end; }, enumerable: true, configurable: true }); return ImmutableTextRange; }()); exports.ImmutableTextRange = ImmutableTextRange;