Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
Removed commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
zone117x committed Jun 7, 2019
1 parent 1b67bd1 commit 15ea142
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions packages/clarity-native-bin/src/streamUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,13 @@ export async function readStream(
const streamArr: (NodeJS.ReadableStream | NodeJS.WritableStream)[] = [stream];
if (monitorCallback) {
const passThrough = new PassThrough();
/*
passThrough.on("data", chunk => {
if (chunk instanceof Buffer) {
monitorCallback(chunk.toString("utf8"));
} else if (typeof chunk === "string") {
monitorCallback(chunk);
} else {
monitorCallback(chunk.toString());
}
});
*/
const readStreamLine = readline.createInterface({
input: passThrough,
crlfDelay: Infinity
});
readStreamLine.on("line", lineData => {
monitorCallback(lineData);
});

/*const monitorStream = new Transform({
transform: (chunk, encoding, callback) => {
monitorCallback(chunk instanceof Buffer ? chunk : Buffer.from(chunk, encoding));
callback(undefined, chunk);
}
});
streamArr.push(monitorStream);*/
streamArr.push(passThrough);
}
streamArr.push(memStream);
Expand Down

0 comments on commit 15ea142

Please sign in to comment.