node_modules: update

This commit is contained in:
Dawid Dziurla
2020-07-09 15:48:05 +02:00
parent 80f113f0ef
commit 73116f5945
14 changed files with 164 additions and 99 deletions

View File

@ -80,11 +80,7 @@ class MimeNode {
/**
* Indicates which encoding should be used for header strings: "Q" or "B"
*/
this.textEncoding = (options.textEncoding || '')
.toString()
.trim()
.charAt(0)
.toUpperCase();
this.textEncoding = (options.textEncoding || '').toString().trim().charAt(0).toUpperCase();
/**
* Immediate parent for this node (or undefined if not set)
@ -441,16 +437,10 @@ class MimeNode {
getTransferEncoding() {
let transferEncoding = false;
let contentType = (this.getHeader('Content-Type') || '')
.toString()
.toLowerCase()
.trim();
let contentType = (this.getHeader('Content-Type') || '').toString().toLowerCase().trim();
if (this.content) {
transferEncoding = (this.getHeader('Content-Transfer-Encoding') || '')
.toString()
.toLowerCase()
.trim();
transferEncoding = (this.getHeader('Content-Transfer-Encoding') || '').toString().toLowerCase().trim();
if (!transferEncoding || !['base64', 'quoted-printable'].includes(transferEncoding)) {
if (/^text\//i.test(contentType)) {
// If there are no special symbols, no need to modify the text
@ -1023,7 +1013,7 @@ class MimeNode {
_handleContentType(structured) {
this.contentType = structured.value.trim().toLowerCase();
this.multipart = this.contentType.split('/').reduce((prev, value) => (prev === 'multipart' ? value : false));
this.multipart = /^multipart\//i.test(this.contentType) ? this.contentType.substr(this.contentType.indexOf('/') + 1) : false;
if (this.multipart) {
this.boundary = structured.params.boundary = structured.params.boundary || this.boundary || this._generateBoundary();