UNPKG

ravendb

Version:
35 lines 840 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StringBuilder = void 0; const node_stream_1 = require("node:stream"); const OsUtil_js_1 = require("./OsUtil.js"); class StringBuilder { s = []; newline; constructor(v) { this.append(v); node_stream_1.Stream.call(this); this.newline = OsUtil_js_1.EOL; } append(v) { if (v != null) { this.s.push(v); } return this; } appendLine(v) { this.s.push(this.newline); if (v != null) { this.s.push(v); } return this; } clear() { this.s.length = 0; } toString() { return this.s.length === 0 ? "" : this.s.join(""); } } exports.StringBuilder = StringBuilder; //# sourceMappingURL=StringBuilder.js.map