mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
23 lines
377 B
JavaScript
23 lines
377 B
JavaScript
'use strict';
|
|
|
|
function StringWriter() {
|
|
this.str = '';
|
|
}
|
|
|
|
StringWriter.prototype = {
|
|
write: function(str) {
|
|
this.str += str;
|
|
return this;
|
|
},
|
|
|
|
/**
|
|
* Converts the string buffer into a String.
|
|
*
|
|
* @returns {String} The built String
|
|
*/
|
|
toString: function() {
|
|
return this.str;
|
|
}
|
|
};
|
|
|
|
module.exports = StringWriter; |