ajax-best-promise
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -96,3 +96,3 @@ "use strict"; | ||
error.status = ajax.status; | ||
var matches = ajax.responseText.match(/^[0-9]*\s*ERROR\s?([^:]+):/i); | ||
var matches = ajax.responseText.match(/^[0-9]*\s*ERROR\s?([^\n:]+):/i); | ||
if(matches && matches[1]){ | ||
@@ -107,8 +107,9 @@ error.code = matches[1]; | ||
} | ||
var matches = line.match(/^(\w+):\s(.*)$/); | ||
if(matches){ | ||
var matchesAttr = line.match(/^(\w+):\s(.*)$/); | ||
if(matchesAttr){ | ||
try{ | ||
var value=JSON.parse(matches[2]); | ||
error[matches[1]]=value; | ||
var value=JSON.parse(matchesAttr[2]); | ||
error[matchesAttr[1]]=value; | ||
}catch(errJson){ | ||
error[matchesAttr[1]]=matchesAttr[2]+''; | ||
} | ||
@@ -161,3 +162,3 @@ } | ||
} | ||
}) | ||
}); | ||
}else{ | ||
@@ -184,3 +185,3 @@ paqueteAEnviar=Object.keys(params.data).map(function(key){ | ||
uploading: function(progressHook){ | ||
this.progressHooks.push(progressHook) | ||
this.progressHooks.push(progressHook); | ||
return intermediateObject; | ||
@@ -187,0 +188,0 @@ }, |
{ | ||
"name": "ajax-best-promise", | ||
"description": "Ajax with best promise - Ajax with stream data", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"author": "Codenautas <codenautas@googlegroups.com>", | ||
@@ -22,13 +22,13 @@ "license": "MIT", | ||
"devDependencies": { | ||
"body-parser": "~1.17.1", | ||
"body-parser": "~1.18.2", | ||
"cookie-parser": "~1.4.3", | ||
"es6-promise": "~4.1.0", | ||
"es6-promise": "~4.1.1", | ||
"expect.js": "~0.3.1", | ||
"express": "~4.15.2", | ||
"express-session": "~1.15.1", | ||
"express-useragent": "~1.0.7", | ||
"fs-promise": "~2.0.0", | ||
"express": "~4.16.2", | ||
"express-session": "~1.15.6", | ||
"express-useragent": "~1.0.8", | ||
"fs-promise": "~2.0.3", | ||
"istanbul": "~0.4.5", | ||
"karma": "~1.5.0", | ||
"karma-chrome-launcher": "~2.0.0", | ||
"karma": "~1.7.1", | ||
"karma-chrome-launcher": "~2.2.0", | ||
"karma-coverage": "~1.1.1", | ||
@@ -42,11 +42,11 @@ "karma-es3-preprocessor": "~0.1.1", | ||
"karma-safari-launcher": "~1.0.0", | ||
"mocha": "~3.2.0", | ||
"moment": "~2.17.1", | ||
"mocha": "~4.0.1", | ||
"moment": "~2.19.1", | ||
"multiparty": "~4.1.3", | ||
"pug": "~2.0.0-beta6", | ||
"pug": "~2.0.0-rc.4", | ||
"read-yaml-promise": "~1.0.2", | ||
"extension-serve-static": "^0.1.6", | ||
"mini-tools": "~0.3.13", | ||
"require-bro": "~0.1.4" | ||
"mini-tools": "~0.3.19", | ||
"require-bro": "~0.1.5" | ||
}, | ||
@@ -65,3 +65,3 @@ "engines": { | ||
"package-version": "0.3.0", | ||
"coverage": 98, | ||
"coverage": 90, | ||
"run-in": "both", | ||
@@ -68,0 +68,0 @@ "stability": "extending", |
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
17030
257