We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7cbf8d commit 0ded191Copy full SHA for 0ded191
src/static/js/Changeset.js
@@ -677,19 +677,11 @@ exports.stringIterator = (str) => {
677
/**
678
* A custom made StringBuffer
679
*/
680
-exports.stringAssembler = () => {
681
- const pieces = [];
682
-
683
- const append = (x) => {
684
- pieces.push(String(x));
685
- };
686
687
- const toString = () => pieces.join('');
688
- return {
689
- append,
690
- toString,
691
692
-};
+exports.stringAssembler = () => ({
+ _str: '',
+ append(x) { this._str += String(x); },
+ toString() { return this._str; },
+});
693
694
695
* Class to iterate and modify texts which have several lines. It is used for applying Changesets on
0 commit comments