Comparing version 0.2.0 to 0.2.1
@@ -36,3 +36,3 @@ "use strict"; | ||
userCallbackDone.apply(null, arguments); | ||
var responseType = (0, _extend2.default)(true, {}, self.settings.defaultResponseType, callback); | ||
var responseType = (0, _extend2.default)(true, {}, self.settings.defaultResponseType, [res]); | ||
Object.keys(responseType).forEach(function (key) { | ||
@@ -43,5 +43,5 @@ if (key[0] === '$') { | ||
}); | ||
var typeKey = self.settings.judgeResponseType.apply(null, arguments); | ||
var typeKey = self.settings.judgeResponseType.apply(null, [res]); | ||
if (typeof responseType[typeKey] === 'function') { | ||
responseType[typeKey].apply(null, arguments); | ||
responseType[typeKey].apply(null, [res]); | ||
} else { | ||
@@ -48,0 +48,0 @@ console.warn("node_modules/better-api: request(settings, callback); callback[\"" + typeKey + "\"] must be a function"); |
{ | ||
"name": "better-api", | ||
"main": "lib/index.js", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "api encapsulation manage", | ||
@@ -6,0 +6,0 @@ "keywords": "", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
17886