update
parent
e526f32b4a
commit
84273469ab
|
@ -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.onField(false, fields)
|
||||
this.data = null
|
||||
|
||||
this.onEnd()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@gm5/request",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"description": "对Http的request进一步封装, 提供常用的API",
|
||||
"main": "index.js",
|
||||
"author": "yutent",
|
||||
|
|
Loading…
Reference in New Issue