3 var utils = require('./utils');
6 * An object to write any content to a string.
9 var StringWriter = function() {
12 StringWriter.prototype = {
14 * Append any content to the current string.
15 * @param {Object} input the content to add.
17 append: function(input) {
18 input = utils.transformTo("string", input);
19 this.data.push(input);
22 * Finalize the construction an return the result.
23 * @return {string} the generated string.
25 finalize: function() {
26 return this.data.join("");
30 module.exports = StringWriter;