v1
宇天 2021-06-22 20:19:23 +08:00
parent e526f32b4a
commit 84273469ab
2 changed files with 2 additions and 12 deletions

View File

@ -26,17 +26,7 @@ JSONParser.prototype.end = function() {
fields = Function(`try{return ${data}}catch(e){}`)() || data
}
if (typeof fields === 'object') {
if (Array.isArray(fields)) {
this.onField(false, fields)
} else {
for (let field in fields) {
this.onField(field, fields[field])
}
}
} else {
this.onField(false, fields)
}
this.data = null
this.onEnd()

View File

@ -1,6 +1,6 @@
{
"name": "@gm5/request",
"version": "1.2.4",
"version": "1.2.5",
"description": "对Http的request进一步封装, 提供常用的API",
"main": "index.js",
"author": "yutent",