(bodyParts)
| 25 | |
| 26 | // parse the body parts and handle the results for the individual mime nodes |
| 27 | export function parse(bodyParts) { |
| 28 | for (const bodyPart of bodyParts) { |
| 29 | const node = parseMIME(bodyPart.raw); |
| 30 | delete bodyPart.raw; // part has been parsed, we can remove the raw attribute |
| 31 | bodyPart.content = []; // holds subparts, e.g. for encrypted and/or signed nodes |
| 32 | // traverse through the parsed result |
| 33 | walkMimeTree(node, bodyPart); |
| 34 | } |
| 35 | return bodyParts; |
| 36 | } |
| 37 | |
| 38 | // functions that return true/false if they were able to handle a certain kind of body part |
| 39 | const mimeTreeMatchers = [matchSubject, matchEncrypted, matchSigned, matchAttachment, matchText, matchHtml]; |
nothing calls this directly
no test coverage detected