mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
feature(pipe) options: notEnd -> end
This commit is contained in:
parent
9339fb08c9
commit
acfde11f42
2 changed files with 9 additions and 4 deletions
|
|
@ -50,7 +50,7 @@
|
|||
};
|
||||
}
|
||||
|
||||
options.notEnd = true;
|
||||
options.end = false;
|
||||
|
||||
if (names) {
|
||||
lenght = names.length;
|
||||
|
|
|
|||
|
|
@ -40,8 +40,13 @@
|
|||
var main,
|
||||
read = streams[0];
|
||||
|
||||
if (!callback)
|
||||
callback = options;
|
||||
if (!callback) {
|
||||
callback = options;
|
||||
|
||||
options = {
|
||||
end: true
|
||||
};
|
||||
}
|
||||
|
||||
streams.forEach(function(stream) {
|
||||
on('error', stream, callback);
|
||||
|
|
@ -50,7 +55,7 @@
|
|||
main = stream;
|
||||
else
|
||||
main = main.pipe(stream, {
|
||||
end: !options.notEnd
|
||||
end: options.end
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue