@petitchevalroux/http-download-stream
Advanced tools
Comparing version 1.2.3 to 1.2.4
{ | ||
"name": "@petitchevalroux/http-download-stream", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Node transform stream downloading url in input with retry and rate limit", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -54,12 +54,11 @@ "use strict"; | ||
getHostFetcher(host) { | ||
if (this.getHostFetcherCount() >= this.maxHostFetchers) { | ||
const self = this; | ||
return this | ||
.deleteLeastRecentlyUsedFetcher() | ||
.then(() => { | ||
return self.getHostFetcher(host); | ||
}); | ||
if ((typeof this.hostFetchers[host]) !== "undefined") { | ||
return Promise.resolve(this.hostFetchers[host]); | ||
} | ||
return typeof(this.hostFetchers[host]) !== "undefined" ? | ||
Promise.resolve(this.hostFetchers[host]) : | ||
const self = this; | ||
return this.getHostFetcherCount() >= this.maxHostFetchers ? | ||
this.deleteLeastRecentlyUsedFetcher() | ||
.then(() => { | ||
return self.createHostFetcher(host); | ||
}) : | ||
this.createHostFetcher(host); | ||
@@ -66,0 +65,0 @@ } |
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
76065
496