wonderful-fetch
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -23,3 +23,3 @@ (function (root, factory) { | ||
var SOURCE = 'library'; | ||
var VERSION = '1.1.0'; | ||
var VERSION = '1.1.1'; | ||
@@ -112,5 +112,5 @@ function WonderfulFetch(url, options) { | ||
function _output(res, r) { | ||
function _output(res, result) { | ||
var headers = {}; | ||
var isError = r instanceof Error; | ||
var isError = result instanceof Error; | ||
@@ -131,3 +131,3 @@ // Iterate over headers and add them to the object | ||
Object.keys(headers[key]).forEach(function (k) { | ||
r[k] = headers[key][k]; | ||
result[k] = headers[key][k]; | ||
}) | ||
@@ -143,3 +143,3 @@ } catch (e) { | ||
if (isError || options.output === 'body') { | ||
return r; | ||
return result; | ||
} else { | ||
@@ -149,3 +149,3 @@ return { | ||
headers: headers, | ||
body: r, | ||
body: result, | ||
} | ||
@@ -155,5 +155,5 @@ } | ||
function _resolve(res, r) { | ||
function _resolve(res, result) { | ||
clearTimeout(timeoutHolder); | ||
return resolve(_output(res, r)); | ||
return resolve(_output(res, result)); | ||
} | ||
@@ -247,3 +247,3 @@ | ||
.catch(function (e) { | ||
return _reject(res, e) | ||
return _reject(undefined, e) | ||
}) | ||
@@ -250,0 +250,0 @@ }, ms); |
{ | ||
"name": "wonderful-fetch", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A wrapper around fetch.", | ||
@@ -36,2 +36,2 @@ "main": "./dist/index.js", | ||
} | ||
} | ||
} |
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
16605