This commit is contained in:
the-djmaze 2026-11-02 18:07:34 +01:00
parent 1cd80f94c7
commit 024343b612
2 changed files with 12 additions and 3 deletions

View file

@ -75,9 +75,18 @@ export function ParseMime(text)
get raw() {
return text.slice(this.start, this.end);
}
/*
get headRaw() {
return Object.keys(this.headers || {}).length ? text.slice(this.start, this.bodyStart) : '';
return this.hasHeader ? text.slice(this.start, this.bodyStart) : '';
}
*/
get hasHeader() {
for (const prop in this.headers) {
if (Object.hasOwn(this.headers, prop)) {
return true;
}
}
return false;
}
get bodyRaw() {