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