UNPKG

@configurator/ravendb

Version:
34 lines 843 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StringBuilder = void 0; const stream_1 = require("stream"); class StringBuilder { constructor(v) { this.s = []; this.append(v); stream_1.Stream.call(this); const isWindows = process.platform === "win32"; this.newline = isWindows ? "\r\n" : "\n"; } 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