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 🙏

© 2026 – Pkg Stats / Ryan Hefner

uml-generator

v0.1.3

Published

Test generate UML

Readme

UML Generator

A simple UML Object Notation generator in SVG, to use in posts, readme and other platforms.

Objective

Create your UML in a simple, reusable and editable way, to use in your tutorials.

The use of images makes modifications difficult, with an UML in SVG any update is simple.

Documentation

Installation

npm install uml-generator

Run

npx uml-generator

Tutorial

  • Choose between creating a new UML or using an existing JSON.

    ? Want to start: (Use arrow keys)
    ❯ A new UML 
      Use a JSON file
  • Select the type that your UML will represent.

    ? Select the type of your UML: (Use arrow keys)
    ❯ class 
      interface 
      abstract class 
  • Insira um nome para seu UML.

    ? Please enter a name: 
  • Enter your UML attributes separated by 'space'.

    ? Add attributes separated by spaces: 
  • Select which attributes will have get methods.

    ? Add getters for: (Press <space> to select, <a> to toggle all, <i> to invert selection)
  • Select which attributes will have set methods.

    ? Add setters for: (Press <space> to select, <a> to toggle all, <i> to invert selection)
  • Enter your UML methods separated by 'space'.

    ? Add methods separated by spaces:

If the answers are those in this same sequence:

  • A new UML
  • class
  • Person
  • name age
  • name age (select all)
  • name age (select all)
  • speak

An uml folder must be created in your project, with an SVG file and a Json file. The SVG should look like this:

<svg class="svg" fill="none" width="264px" height="265" xmlns="http://www.w3.org/2000/svg">
  <foreignObject width="100%" height="100%">
    <div xmlns="http://www.w3.org/1999/xhtml">
      <div class="uml" style=" width: 256px; border: 2px solid #ccc ;border-radius: 12px 6px 12px 6px; letter-spacing: 1px; ">
        <div class="header" style=" font-weight: bold; font-size: 14px; line-height: 15px; padding: 10px; text-align: center;"><span style=" font-weight: lighter; color: #aaa">class</span><br/><span style=" font-size: 24px; color: #666">Person</span><br/></div>
        <div class="attributes" style="font-weight: 400; font-size: 16px; line-height: 26px; text-align: left; border-top: 3px solid #ccc; border-radius:12px; padding: 5px 10px 5px 30px "><span>name</span><br/><span>age</span><br/></div>
        <div class="methods" style="font-weight: 400; font-size: 16px; line-height: 26px; text-align: left; border-top: 3px solid #ccc; border-radius:12px; padding: 5px 10px 5px 30px"><span>get name( )</span><br/><span>get age( )</span><br/><span>set name( )</span><br/><span>set age( )</span><br/><span>speak( )</span><br/></div>
      </div>
    </div>
  </foreignObject>
</svg>

To use SVG in your markdown document, add the svg file as follows:

![](./uml/Person.svg)