diff --git a/index.js b/index.js index 843da72..060ce5f 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,7 @@ var isFn = function (fn) { } var isFS = function (stream) { + if (!fs) return false // browser return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) } diff --git a/package.json b/package.json index 6781698..69b8e09 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,9 @@ "repository": "git://github.com/mafintosh/pump.git", "license": "MIT", "description": "pipe streams together and close all of them if one of them closes", + "browser": { + "fs": false + }, "keywords": [ "streams", "pipe",