mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
split def. fix
This commit is contained in:
parent
3c74c3686d
commit
b164150c40
@ -6,11 +6,11 @@ import split = require("split");
|
||||
|
||||
var testStream = new stream.Readable();
|
||||
|
||||
testStream.pipe = function(dest) {
|
||||
testStream.pipe = function(dest: stream.Writable) {
|
||||
dest.write("This is \r\n new \r\n line");
|
||||
return dest;
|
||||
};
|
||||
|
||||
testStream.pipe(split(/(\r?\n)/, null, {maxLength: 20})).on("data", function(line) {
|
||||
console.log("Line: " + line + "\r\n");
|
||||
testStream.pipe(split(/(\r?\n)/, null, {maxLength: 20})).on("data", function(line: Buffer) {
|
||||
console.log("Line: " + line.toString('ascii') + "\r\n");
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user