X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-demo.git;a=blobdiff_plain;f=afb-client%2Fbower_components%2Fjszip%2Flib%2FstringWriter.js;fp=afb-client%2Fbower_components%2Fjszip%2Flib%2FstringWriter.js;h=45db54841c21d5b4d6270e217971d47f1fd849b5;hp=0000000000000000000000000000000000000000;hb=5b1e6cc132f44262a873fa8296a2a3e1017b0278;hpb=f7d2f9ac4168ee5064580c666d508667a73cefc0 diff --git a/afb-client/bower_components/jszip/lib/stringWriter.js b/afb-client/bower_components/jszip/lib/stringWriter.js new file mode 100644 index 0000000..45db548 --- /dev/null +++ b/afb-client/bower_components/jszip/lib/stringWriter.js @@ -0,0 +1,30 @@ +'use strict'; + +var utils = require('./utils'); + +/** + * An object to write any content to a string. + * @constructor + */ +var StringWriter = function() { + this.data = []; +}; +StringWriter.prototype = { + /** + * Append any content to the current string. + * @param {Object} input the content to add. + */ + append: function(input) { + input = utils.transformTo("string", input); + this.data.push(input); + }, + /** + * Finalize the construction an return the result. + * @return {string} the generated string. + */ + finalize: function() { + return this.data.join(""); + } +}; + +module.exports = StringWriter;