Comparing version 2.0.0 to 2.0.1
@@ -6,2 +6,3 @@ var once = require('once') | ||
var noop = function () {} | ||
var ancient = /^v?\.0/.test(process.version) | ||
@@ -13,2 +14,3 @@ var isFn = function (fn) { | ||
var isFS = function (stream) { | ||
if (!ancient) return false // newer node version do not need to care about fs is a special way | ||
if (!fs) return false // browser | ||
@@ -15,0 +17,0 @@ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) |
{ | ||
"name": "pump", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"repository": "git://github.com/mafintosh/pump.git", | ||
@@ -22,4 +22,4 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "node test.js" | ||
"test": "node test-browser.js && node test-node.js" | ||
} | ||
} |
@@ -33,3 +33,6 @@ var stream = require('stream') | ||
var check = function () { | ||
if (wsClosed && rsClosed && callbackCalled) console.log('done') | ||
if (wsClosed && rsClosed && callbackCalled) { | ||
console.log('test-browser.js passes') | ||
clearTimeout(timeout) | ||
} | ||
} | ||
@@ -57,4 +60,5 @@ | ||
setTimeout(function () { | ||
if (!check()) throw new Error('timeout') | ||
var timeout = setTimeout(function () { | ||
check() | ||
throw new Error('timeout') | ||
}, 5000) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7378
154