Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

emailjs-mime-builder

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emailjs-mime-builder - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

4

dist/builder.js

@@ -448,3 +448,3 @@ 'use strict';

case 'base64':
lines.push((0, _emailjsMimeCodec.base64Encode)(this.content, _typeof(this.content) === 'object' && 'binary' || false));
lines.push((0, _emailjsMimeCodec.base64Encode)(this.content, _typeof(this.content) === 'object' ? 'binary' : undefined));
break;

@@ -533,2 +533,2 @@ default:

exports.default = MimeNode;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9idWlsZGVyLmpzIl0sIm5hbWVzIjpbIk1pbWVOb2RlIiwiY29udGVudFR5cGUiLCJvcHRpb25zIiwibm9kZUNvdW50ZXIiLCJiYXNlQm91bmRhcnkiLCJEYXRlIiwibm93IiwidG9TdHJpbmciLCJNYXRoIiwicmFuZG9tIiwiZGF0ZSIsInJvb3ROb2RlIiwiZmlsZW5hbWUiLCJzcGxpdCIsInBvcCIsInBhcmVudE5vZGUiLCJfbm9kZUlkIiwiX2NoaWxkTm9kZXMiLCJfaGVhZGVycyIsInNldEhlYWRlciIsIm5vZGUiLCJhcHBlbmRDaGlsZCIsImNoaWxkTm9kZSIsInB1c2giLCJmb3JFYWNoIiwiaSIsInVuZGVmaW5lZCIsImxlbmd0aCIsInNwbGljZSIsImtleSIsInZhbHVlIiwiYWRkZWQiLCJBcnJheSIsImlzQXJyYXkiLCJPYmplY3QiLCJrZXlzIiwiaGVhZGVyVmFsdWUiLCJsZW4iLCJhZGRIZWFkZXIiLCJjb250ZW50IiwibGluZXMiLCJnZXRIZWFkZXIiLCJ0b0xvd2VyQ2FzZSIsInRyaW0iLCJ0cmFuc2ZlckVuY29ka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gICAgICAgICAgICAgIC5zdWJzdHJpbmcoMSlcbiAgICAgICAgICB9LCBEYXRlLm5vdygpKSArXG4gICAgICAgICAgJ0AnICtcbiAgICAgICAgICAvLyB0cnkgdG8gdXNlIHRoZSBkb21haW4gb2YgdGhlIEZST00gYWRkcmVzcyBvciBmYWxsYmFjayBsb2NhbGhvc3RcbiAgICAgICAgICAodGhpcy5nZXRFbnZlbG9wZSgpLmZyb20gfHwgJ2xvY2FsaG9zdCcpLnNwbGl0KCdAJykucG9wKCkgK1xuICAgICAgICAgICc+JylcbiAgICAgIH1cbiAgICAgIGlmICghdGhpcy5nZXRIZWFkZXIoJ01JTUUtVmVyc2lvbicpKSB7XG4gICAgICAgIGxpbmVzLnB1c2goJ01JTUUtVmVyc2lvbjogMS4wJylcbiAgICAgIH1cbiAgICB9XG4gICAgbGluZXMucHVzaCgnJylcblxuICAgIGlmICh0aGlzLmNvbnRlbnQpIHtcbiAgICAgIHN3aXRjaCAodHJhbnNmZXJFbmNvZGluZykge1xuICAgICAgICBjYXNlICdxdW90ZWQtcHJpbnRhYmxlJzpcbiAgICAgICAgICBsaW5lcy5wdXNoKHF1b3RlZFByaW50YWJsZUVuY29kZSh0aGlzLmNvbnRlbnQpKVxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgJ2Jhc2U2NCc6XG4gICAgICAgICAgbGluZXMucHVzaChiYXNlNjRFbmNvZGUodGhpcy5jb250ZW50LCB0eXBlb2YgdGhpcy5jb250ZW50ID09PSAnb2JqZWN0JyA/ICdiaW5hcnknIDogdW5kZWZpbmVkKSlcbiAgICAgICAgICBicmVha1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIGlmIChmbG93ZWQpIHtcbiAgICAgICAgICAgIGxpbmVzLnB1c2goZm9sZExpbmVzKHRoaXMuY29udGVudC5yZXBsYWNlKC9cXHI/XFxuL2csICdcXHJcXG4nKVxuICAgICAgICAgICAgICAvLyBzcGFjZSBzdHVmZmluZyBodHRwOi8vdG9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R1cmVkLnZhbHVlLnRyaW0oKS50b0xvd2VyQ2FzZSgpXG5cbiAgICB0aGlzLm11bHRpcGFydCA9IHRoaXMuY29udGVudFR5cGUuc3BsaXQoJy8nKS5yZWR1Y2UoZnVuY3Rpb24gKHByZXYsIHZhbHVlKSB7XG4gICAgICByZXR1cm4gcHJldiA9PT0gJ211bHRpcGFydCcgPyB2YWx1ZSA6IGZhbHNlXG4gICAgfSlcblxuICAgIGlmICh0aGlzLm11bHRpcGFydCkge1xuICAgICAgdGhpcy5ib3VuZGFyeSA9IHN0cnVjdHVyZWQucGFyYW1zLmJvdW5kYXJ5ID0gc3RydWN0dXJlZC5wYXJhbXMuYm91bmRhcnkgfHwgdGhpcy5ib3VuZGFyeSB8fCBnZW5lcmF0ZUJvdW5kYXJ5KHRoaXMuX25vZGVJZCwgdGhpcy5yb290Tm9kZS5iYXNlQm91bmRhcnkpXG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMuYm91bmRhcnkgPSBmYWxzZVxuICAgIH1cbiAgfVxufVxuIl19

@@ -41,3 +41,3 @@ 'use strict';

} else {
return (0, _emailjsMimeCodec.mimeWordEncode)(name, 'Q', 52);
return (0, _emailjsMimeCodec.mimeWordEncode)(name, 'Q');
}

@@ -74,3 +74,3 @@ }

address.address = address.address.replace(/^.*?(?=@)/, function (user) {
return (0, _emailjsMimeCodec.mimeWordsEncode)(user, 'Q', 52);
return (0, _emailjsMimeCodec.mimeWordsEncode)(user, 'Q');
}).replace(/@.+$/, function (domain) {

@@ -237,2 +237,2 @@ return '@' + (0, _punycode.toASCII)(domain.substr(1));

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy91dGlscy5qcyJdLCJuYW1lcyI6WyJpc1BsYWluVGV4dCIsImNvbnZlcnRBZGRyZXNzZXMiLCJwYXJzZUFkZHJlc3NlcyIsImVuY29kZUhlYWRlclZhbHVlIiwibm9ybWFsaXplSGVhZ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zZSB7XG4gICAgICBwYXJhbXNBcnJheS5wdXNoKHBhcmFtICsgJz0nICsgZXNjYXBlSGVhZGVyQXJndW1lbnQoc3RydWN0dXJlZC5wYXJhbXNbcGFyYW1dKSlcbiAgICB9XG4gIH0pXG5cbiAgcmV0dXJuIHN0cnVjdHVyZWQudmFsdWUgKyAocGFyYW1zQXJyYXkubGVuZ3RoID8gJzsgJyArIHBhcmFtc0FycmF5LmpvaW4oJzsgJykgOiAnJylcbn1cbiJdfQ==
{
"name": "emailjs-mime-builder",
"version": "2.0.0",
"version": "2.0.1",
"homepage": "https://github.com/emailjs/emailjs-mime-builder",

@@ -5,0 +5,0 @@ "description": "emailjs-mime-builder is a low level rfc2822 message composer. Define your own mime tree, no magic included.",

# emailjs-mime-builder
[![Greenkeeper badge](https://badges.greenkeeper.io/emailjs/emailjs-mime-builder.svg)](https://greenkeeper.io/)
*emailjs-mime-builder* is a low level rfc2822 message composer. Define your own mime tree, no magic included.

@@ -4,0 +6,0 @@

@@ -401,3 +401,3 @@ import {

case 'base64':
lines.push(base64Encode(this.content, (typeof this.content === 'object' && 'binary') || false))
lines.push(base64Encode(this.content, typeof this.content === 'object' ? 'binary' : undefined))
break

@@ -404,0 +404,0 @@ default:

@@ -24,3 +24,3 @@ /* eslint-disable node/no-deprecated-api */

} else {
return mimeWordEncode(name, 'Q', 52)
return mimeWordEncode(name, 'Q')
}

@@ -56,3 +56,3 @@ }

address.address = address.address
.replace(/^.*?(?=@)/, user => mimeWordsEncode(user, 'Q', 52))
.replace(/^.*?(?=@)/, user => mimeWordsEncode(user, 'Q'))
.replace(/@.+$/, domain => '@' + toASCII(domain.substr(1)))

@@ -59,0 +59,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc