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

mailgun-js

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailgun-js - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

14

lib/request.js

@@ -42,3 +42,3 @@ var https = require('https');

if (params && params.attachment) {
if (params && (params.attachment || params.inline)) {
this.prepareFormData(params);

@@ -95,8 +95,10 @@ }

var obj = data[key];
if (key === 'attachment') {
if (key === 'attachment' || key === 'inline') {
if (Array.isArray(obj)) {
obj.forEach(this.handleAttachmentObject, this);
for (var i = 0; i < obj.length; i++) {
this.handleAttachmentObject(key, obj[i]);
}
}
else {
this.handleAttachmentObject(obj);
this.handleAttachmentObject(key, obj);
}

@@ -112,7 +114,5 @@ }

Request.prototype.handleAttachmentObject = function (obj) {
Request.prototype.handleAttachmentObject = function (key, obj) {
if (!this.form) this.form = new FormData();
var key = 'attachment';
if (Buffer.isBuffer(obj)) {

@@ -119,0 +119,0 @@ this.form.append(key, obj, {filename: 'file'});

@@ -8,3 +8,3 @@ {

"keywords": ["email", "mailgun"],
"version": "0.4.3",
"version": "0.4.4",
"homepage": "https://github.com/1lobby/mailgun-js",

@@ -11,0 +11,0 @@ "license": "MIT",

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