New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-mermaid-render

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-mermaid-render

Render Mermaid charts in Node.js environment.

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-mermaid-render

Render Mermaid charts in Node.js environment.

Also can be seen as a simplified version of mermaid-cli with better API support.

Most of its core code is from mermaid-cli.

Install

npm install node-mermaid-render

Usage

import { NodeMermaidRender } from "node-mermaid-render";

const mermaidRender = new NodeMermaidRender();

(async () => {
  // Initialize mermaid render.
  // If don't call this method, it will be called automatically when calling rendering method.
  // Remember to call it with `await` keyword.
  await mermaidRender.initialize();

  const svg = await mermaidRender.renderToSVG(`
    graph TD;
      A-->B;
      A-->C;
      B-->D;
      C-->D;
  `).data.toString();
})();

Keywords

FAQs

Package last updated on 11 Jul 2023

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

  • 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