mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Removed unused code
This commit is contained in:
parent
8d0ea7716e
commit
ca86bac960
@ -27,14 +27,6 @@ var voidWriter = {
|
||||
write: function() {}
|
||||
};
|
||||
|
||||
function StreamWriter(stream) {
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
StreamWriter.prototype.write = function(data) {
|
||||
this.stream.write(data);
|
||||
};
|
||||
|
||||
function getAsyncAttributes(context) {
|
||||
var attrs = context.attributes;
|
||||
return attrs.async;
|
||||
@ -72,9 +64,6 @@ function BufferedFragment(context, buffer) {
|
||||
}
|
||||
BufferedFragment.prototype = {
|
||||
flush: function () {
|
||||
if (!this.ready || this.flushed) {
|
||||
throw new Error('Invalid state');
|
||||
}
|
||||
var writer = this.writer;
|
||||
writer.write(this.buffer.toString());
|
||||
this.flushed = true;
|
||||
@ -152,10 +141,8 @@ function Context(writer, attributes) {
|
||||
|
||||
if (writer) {
|
||||
if (writer.pipe) {
|
||||
var stream = writer;
|
||||
writer = new StreamWriter(stream);
|
||||
this.on('end', function() {
|
||||
stream.end();
|
||||
writer.end();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user