npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@maikmb/herbs2mermaid

v1.1.0

Published

A lib to help you generate mermaid diagrams from your herbs project

Downloads

17

Readme

CI build codecov

herbs2mermaid

With Herbs2mermaid you can generate Mermaid Class Diagram or Flow Chat easely.

Installing

    $ npm install @maikmb/herbs2mermaid

Functioning

To use the herbs2mermaid you must given a list of usecases or entities to generate class diagram or flow chart.

Using

The quickest way to use the herbs2mermaid is to install this packages in your project and use the functions bellow:

usecase2diagram: - Generate flow chart to a list of usecases

entity2diagram: - Generate class diagram to a list of entities

In your app or server project, import the herbs2mermaid functions


const { usecase2diagram, entity2diagram } = require('@maikmb/herbs2mermaid')

And call the shelf into you prefered rest route


const classDiagram = entity2diagram(entities)
console.log(classDiagram)


const usecasesFlowChart = usecase2diagram(usecases)
console.log(usecasesFlowChart)

If your project has a readme.md, this content should be shown at the beginning of the project. If you want to use a custom readme, you can specify on startup:


const shelf = renderShelfHTML('Project Name', usecases(), entities, './custom-readme.md')

You can see the full functionality into the TODO-LIST ON HERBS repository

TODO

  • [ ] Complex scenarios with recursive IfElse Step
  • [ ] Complex scenarios with recursive Multi Level Step
  • [ ] Include options to render diagram to Vertical or Horizontal posistion

Contribute

Come with us to make an awesome herbs2mermaid.

Now, if you do not have the technical knowledge and also have intended to help us, do not feel shy, click here to open an issue and collaborate their ideas, the contribution may be a criticism or a compliment (why not?)

If you would like to help contribute to this repository, please see CONTRIBUTING

License

herbsshelf is released under the MIT license