| 1234567891011121314151617181920212223242526 |
- "use strict";
- // Copyright (c) .NET Foundation. All rights reserved.
- // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
- Object.defineProperty(exports, "__esModule", { value: true });
- // Not exported from index
- /** @private */
- var TextMessageFormat = /** @class */ (function () {
- function TextMessageFormat() {
- }
- TextMessageFormat.write = function (output) {
- return "" + output + TextMessageFormat.RecordSeparator;
- };
- TextMessageFormat.parse = function (input) {
- if (input[input.length - 1] !== TextMessageFormat.RecordSeparator) {
- throw new Error("Message is incomplete.");
- }
- var messages = input.split(TextMessageFormat.RecordSeparator);
- messages.pop();
- return messages;
- };
- TextMessageFormat.RecordSeparatorCode = 0x1e;
- TextMessageFormat.RecordSeparator = String.fromCharCode(TextMessageFormat.RecordSeparatorCode);
- return TextMessageFormat;
- }());
- exports.TextMessageFormat = TextMessageFormat;
- //# sourceMappingURL=TextMessageFormat.js.map
|