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

@latinfor/dormouse

v0.0.3

Published

An unopinionated documentation generator. Work in Progress

Downloads

36

Readme

Dormouse

An unopinionated documentation generator.

Dormouse is in a pre-alpha state. You should expect that the API will change, possibly dramatically, before the 1.0 release.

What is it?

Dormouse reads block comments and then converts them into JSON.

/**
 * Takes a number and returns its double.
 #foo
 */
function foo (x) {

    /** @foo The foo function only passes on Tuesdays. */
    if (now.getDay() !== "Tuesday") {
        throw new Error("It's not Tuesday");
    }

    return x * 2;
}
{
   "_1505652070564": {
      "id": "_1505652070564",
      "links": [
         "foo"
      ],
      "properties": {},
      "text": "The foo function only passes on Tuesdays.",
      "location": 133,
      "previous": "foo",
      "next": null
   },
   "foo": {
      "id": "foo",
      "links": [
         "_1505652070564"
      ],
      "properties": {},
      "text": "Takes a number and returns its double.",
      "location": 55,
      "previous": null,
      "next": "_1505652070564"
   }
}

JSON?

Yep! Whereas most documentation generators output HTML, Dormouse outputs your documentation as a JSON graph. This gives you a large amount of control over how your documentation can be used. It also allows you to pipe your documentation into other programs or processors.

Why Dormouse?

Most documentation generators are Frameworks. They only allow you to describe your code using a pre-defined list of tags and behaviors.

Dormouse rejects that entire concept. You can use any ID you want for a node, and any node can be linked to any other node. You can even append custom properties to nodes to further describe them.

Dormouse's sense of freedom allows you to adopt your documentation to fit your code, not the other way around.

Basic Overview

Custom IDs:

IDs are optional for nodes. Whenever you supply one, your node will be indexed by that ID. This means that you can access any node you've given an ID in O(1) time.

/** #foo An arbitrary block of text */
{
   "foo": {
      "id": "foo",
      "links": [],
      "properties": {},
      "text": "An arbitrary block of text",
      "location": 38,
      "previous": null,
      "next": null
   }
}

Linking:

Any node can be linked to any other node. If you link to a node that doesn't exist yet, it will be created for you.

Notice that below, tags without IDs are indexed by their creation timestamp. This reduces the chance of collisions if you want to merge multiple graphs of documentation.

/**
 * My custom method
 @deprecated
 */
{
   "_1506097199281": {
      "id": "_1506097199281",
      "links": [
         "deprecated"
      ],
      "properties": {},
      "text": "My custom method",
      "location": 40,
      "previous": null,
      "next": null
   },
   "deprecated": {
      "id": "deprecated",
      "links": [
         "_1506097199281"
      ],
      "properties": {},
      "text": ""
   }
}

Properties:

Nodes can also be given custom properties. These should be used to provide additional metadata about the node.

/**
 * My custom method
 .created August 28, 2017
 */
{
   "_1506097385110": {
      "id": "_1506097385110",
      "links": [],
      "properties": {
         "created": "August 28, 2017"
      },
      "text": "My custom method",
      "location": 53,
      "previous": null,
      "next": null
   }
}

View this file's source