Socket
Book a DemoInstallSign in
Socket

npm-cid

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-cid

> Visit http://anyfetch.com for details about AnyFetch.

0.1.4
latest
Source
npmnpm
Version published
Weekly downloads
32
45.45%
Maintainers
2
Weekly downloads
 
Created
Source

CID Replace

Visit http://anyfetch.com for details about AnyFetch.

Replace CID img balise in HTML mail with corresponding attachment

You can test it : npm test.

Usage

You must have a string which is your HTML code and an array of attachments with differents properties : - fileName : the file name - contentId : the content ID (optionnal) - content : the content in base 64 (node buffer or string)

The module function returns the new HTML without useless CID img. Now, attachments have a property 'applied' which is true when there was a CID img which match with this attachment.

var cid = require('npm-cid');

var attachments = [
  {
    fileName: "test.jpg",
    contentId: "test",
    content: "base64contentofimg"
  }
];

console.log(cid('<img src="cid:test@evfeuv">', attachments));

Support: support@anyfetch.com.

Keywords

anyfetch

FAQs

Package last updated on 11 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.