ravendb
Version:
RavenDB client for Node.js
31 lines • 656 B
JavaScript
import { Stream } from "node:stream";
import { EOL } from "./OsUtil.js";
export class StringBuilder {
s = [];
newline;
constructor(v) {
this.append(v);
Stream.call(this);
this.newline = 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("");
}
}
//# sourceMappingURL=StringBuilder.js.map