# mermaid-svg

> Generate mermaid diagram SVGs

Latest version **0.0.1** (published 2018-10-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install mermaid-svg
pnpm add mermaid-svg
yarn add mermaid-svg
bun add mermaid-svg
```

## 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.0.1 |
| Published | 2018-10-16 |
| First published | 2018-10-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 837.9 KB |
| Known vulnerabilities | 0 (+8 in 1 direct dependencies) |
| Install scripts | no |
| Author | Wilson Lin |
| Maintainers | wilsonzlin |
| Keywords | mermaid, svg |

## Links

- npm: https://www.npmjs.com/package/mermaid-svg
- Repository: https://github.com/wilsonzlin/mermaid-svg
- Homepage: https://github.com/wilsonzlin/mermaid-svg#readme
- Issues: https://github.com/wilsonzlin/mermaid-svg/issues
- npm.io page: https://npm.io/package/mermaid-svg

## Dependencies (2)

- [mermaid](https://npm.io/package/mermaid.md) ^8.0.0-rc.8
- [puppeteer](https://npm.io/package/puppeteer.md) ^1.9.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2018-10-16

## README

# mermaid-svg

## Installation

```bash
# For npm
npm i --save mermaid-svg
# For yarn
yarn add mermaid-svg
```

## Usage

```typescript
import {generateMermaidSVG} from "mermaid-svg";
import * as fs from "fs";

(async function() {
  const mermaid = `
    graph TD
    A[Christmas] -->|Get money| B(Go shopping)
    B --> C{Let me think}
    C -->|One| D[Laptop]
    C -->|Two| E[iPhone]
    C -->|Three| F[fa:fa-car Car]
  ```;

  const svg = await generateMermaidSVG(mermaid);

  fs.writeFileSync("/diagram.svg", svg);
})();

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