UNPKG

558 BJavaScriptView Raw
1var Parser = require("./Parser.js");
2
3var WritableStream = function(cbs, options){
4 Parser.call(this, cbs, options);
5};
6
7require("util").inherits(WritableStream, require("stream").Stream);
8
9//util.inherits would overwrite the prototype when called twice,
10//so we need a different approach
11Object.getOwnPropertyNames(Parser.prototype).forEach(function(name){
12 WritableStream.prototype[name] = Parser.prototype[name];
13});
14
15WritableStream.prototype.writable = true;
16
17// TODO improve support for Parser#pause and Parser#continue
18
19module.exports = WritableStream;
\No newline at end of file