You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
207 B
JavaScript
12 lines
207 B
JavaScript
9 years ago
|
'use strict';
|
||
|
|
||
|
const split = require("split");
|
||
|
|
||
|
module.exports = function logStream(stream, logger) {
|
||
|
stream.pipe(split()).on("data", function(data) {
|
||
|
if (data.trim() !== "") {
|
||
|
logger(data);
|
||
|
}
|
||
|
})
|
||
|
}
|