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

@gene-code/rehype

v0.0.9

Published

Rehype plugin that renders gene-code DSL code blocks into SVG diagrams.

Readme

gene-code Rehype plugin

This is a rehype plugin that enables the mermaid-like diagram code visualizations.

Just use gene-code as lang parameter on a code block, followed by diagram description:

```gene-code
lollipopDiagram
    gene KRAS
    length 189
    domain 5 166 GTPase
    domain 167 185 HVR
    variant G12D 12 missense
    variant G12V 12 missense
    variant G12C 12 missense
    variant G12A 12 missense
    variant G12S 12 missense
    variant G12R 12 missense
    variant G13D 13 missense
    variant G13C 13 missense
    variant V14I 14 missense
    variant L19F 19 missense
    variant Q22K 22 missense
    variant T35fs 35 frameshift

Currently supports two types of diagrams:

  • Lollipop variants diagram: lollipopDiagram
  • Pedigree diagram: pedigreeDiagram

Lollipop variants diagram: lollipopDiagram

The syntax:

lollipopDiagram                   <-- diagram type
    gene KRAS                 <-- label of the gene
    length 189                <-- length
    domain 5 166 GTPase       <-- protein domain start, end and label
    domain 167 185 HVR
    variant G12D 12 missense  <-- variant label, pos ans class

Pedigree diagram: pedigreeDiagram

pedigreeDiagram
    node gf male unaffected noncarrier        <-- node/individual's ID, sex, phenotype, genotype
    node gm female unaffected carrier
    couple gf gm                              <-- parents node IDs
    node uncle male unknown unknown gf-gm
    node dad male unaffected carrier gf-gm
    node mom female unaffected carrier
    couple dad mom
    node childless_a male unaffected noncarrier gf-gm
    node childless_b female unaffected unknown
    couple childless_a childless_b
    node son male affected carrier dad-mom
    node daughter female unaffected carrier dad-mom
    node baby male unaffected noncarrier dad-mom

Usage in markdown

Use as any other rehype plugins. See the example-react package for basic example.

// App.tsx

import rehypeGeneCode from "@gene-code/rehype";
import remarkGfm from "remark-gfm";
import Markdown from "react-markdown";

//... in a component
<Markdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeGeneCode]}>
  {text}
</Markdown>;