# npm-cid

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

Latest version **0.1.4** (published 2017-11-11) · 0 weekly downloads

## Install

```sh
npm install npm-cid
pnpm add npm-cid
yarn add npm-cid
bun add npm-cid
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2017-11-11 |
| First published | 2014-07-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Quentin Buathier |
| Maintainers | quentin01, matthieu.bacconnier |
| Keywords | anyfetch, cid, mail |

## Links

- npm: https://www.npmjs.com/package/npm-cid
- Repository: https://github.com/AnyFetch/npm-cid
- Homepage: https://github.com/AnyFetch/npm-cid#readme
- Issues: https://github.com/AnyFetch/npm-cid/issues
- npm.io page: https://npm.io/package/npm-cid

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2017-11-11
- 0.1.3 — 2014-07-02
- 0.1.2 — 2014-07-02
- 0.1.1 — 2014-07-02
- 0.1.0 — 2014-07-02

## README

# 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.

```js
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`.

---
_Source: https://npm.io/package/npm-cid · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
