working on functions
This commit is contained in:
parent
1c6eff0c6c
commit
c0f4dc6c64
@ -252,12 +252,9 @@ class Mime {
|
|||||||
static walkMime(mimeObj, methods, recursive=true) {
|
static walkMime(mimeObj, methods, recursive=true) {
|
||||||
let contType = Mime._decodeComplexField(mimeObj, "content-type");
|
let contType = Mime._decodeComplexField(mimeObj, "content-type");
|
||||||
if (contType && contType.startsWith("mulipart/") && recursive) {
|
if (contType && contType.startsWith("mulipart/") && recursive) {
|
||||||
for (let i = 0; i < mimeObj.body.length; i++) {
|
mimeObj.body.forEach(obj => Mime.walkMime(obj, methods, recursive));
|
||||||
mimeObj
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
methods.forEach(method => method(mimeObj));
|
methods.forEach(method => method(mimeObj));
|
||||||
yield mimeObj;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user