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 16b714d commit 4bac8b5Copy full SHA for 4bac8b5
src/static/js/Changeset.js
@@ -726,22 +726,14 @@ exports.stringIterator = (str) => {
726
/**
727
* @returns {StringAssembler}
728
*/
729
-exports.stringAssembler = () => {
730
- const pieces = [];
731
-
+exports.stringAssembler = () => ({
+ _str: '',
732
733
* @param {string} x -
734
735
- const append = (x) => {
736
- pieces.push(String(x));
737
- };
738
739
- const toString = () => pieces.join('');
740
- return {
741
- append,
742
- toString,
743
744
-};
+ append(x) { this._str += String(x); },
+ toString() { return this._str; },
+});
745
746
747
* Class to iterate and modify texts which have several lines. It is used for applying Changesets on
0 commit comments