From acfde11f42548e710853bfdf6c840bf6f82ecd79 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sun, 2 Nov 2014 05:43:18 -0500 Subject: [PATCH] feature(pipe) options: notEnd -> end --- lib/server/files.js | 2 +- lib/server/pipe.js | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/server/files.js b/lib/server/files.js index 7b9fc2c1..3b5df3b6 100644 --- a/lib/server/files.js +++ b/lib/server/files.js @@ -50,7 +50,7 @@ }; } - options.notEnd = true; + options.end = false; if (names) { lenght = names.length; diff --git a/lib/server/pipe.js b/lib/server/pipe.js index 551aa01f..c8f888cd 100644 --- a/lib/server/pipe.js +++ b/lib/server/pipe.js @@ -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 }); });