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

diagrams

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diagrams

Generate Flowcharts, Network Sequence Diagrams, and Railroad Diagrams

  • 0.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22
increased by46.67%
Maintainers
1
Weekly downloads
 
Created
Source

Overview

Installation

npm install -g diagrams

Usage

Railroad Diagrams

  1. Run the following command from your terminal

     diagrams railroad inputTextFile example.svg
    
  2. If your inputTextFile's content was this:

Diagram(
  Optional('+', 'skip'),
    Choice(0,
      NonTerminal('name-start char'),
      NonTerminal('escape')),
      ZeroOrMore(
        Choice(0,
          NonTerminal('name char'),
          NonTerminal('escape'))))
  1. ...then your example.svg should look like this:

Tips & Tricks

Embedding SVGs into Github Markdown

If you host your SVG file somewhere like using Github Pages, you can embed svg diagrams into your markdown files using the following style syntax:

<img src="http://francoislaberge.github.io/diagrams/docs/example.svg">

Credits

  • railroad-diagrams for the heavy lifting generating railroad diagrams

Keywords

FAQs

Package last updated on 09 Oct 2015

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