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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@verikami/remark-deflist-revisited

v0.6.6

Published

Remark plugin. A wrapper around `remark-deflist` with improved support for nested definition lists. Bun, Deno and Cloudflare Workers compatibility.

Readme

@verikami/remark-deflist-revisited

GH CC CI NPM JSR

Remark plugin. A wrapper around remark-deflist with improved support for nested definition lists. It preserves all the original functionality and performs additional processing. Bun, Deno and Cloudflare Workers compatibility. Also works in Astro and web browser.

Installation

ツ pnpm add @verikami/remark-deflist-revisited
ツ npm i @verikami/remark-deflist-revisited

The interactive Sample Installer

ツ npm create remark-deflist-revisited@latest

Cloudflare Worker demo

ツ npx @verikami/remark-deflist-revisited@latest
ツ npx @verikami/remark-deflist-revisited --help

TypeScript version

ツ pnpm add jsr:@verikami/remark-deflist-revisited
ツ npx jsr add @verikami/remark-deflist-revisited

Usage

The problem with remark-deflist is that the plugin renders nested list items inside <dd> incorrectly.

Markdown

Term
: - item A
  - item B
  - item C

With remark-deflist

<dl>
<dt> Term </dt>
<dd>
  <ul>
    <li> item A </li>
  </ul>
</dl>
<ul>
  <li> item B </li>
  <li> item C </li>
</ul>

With @verikami/remark-deflist-revisited

<dl>
<dt>Term</dt>
<dd>
  <ul>
    <li> item A </li>
    <li> item B </li>
    <li> item C </li>
  </ul>
</dl>

Notes

  1. Using : * as a list marker (especially for the first item) is resolved in v0.4.0
  2. Using : - *x* or : - **x** is not problematic
  3. Coverage 100% via Codecov from version v0.4.1
  4. Cloudflare Worker demo via npx from version v0.5.22
  5. Score 100/100 via Socket from version v0.5.23
  6. See generated examples for real life test

Usage in Node.js

import { remark } from "remark";
import html from "remark-html";
import deflist from "@verikami/remark-deflist-revisited";

const markdown = `
Term
: - item A
  - item B
  - item C
`;

const output = await remark()
  .use(deflist)
  .use(html)
  .process(markdown);

console.log(String(output));

Usage in Deno

import { remark } from "npm:remark@^15";
import html from "npm:remark-html@^16";
import deflist from "npm:@verikami/remark-deflist-revisited";

// (...) same code as above

Usage in Astro

import { defineConfig } from "astro/config";
import remarkDeflist from "@verikami/remark-deflist-revisited";

export default defineConfig({
  markdown: {
    remarkPlugins: [
      remarkDeflist
    ]
  }
});

Usage in Cloudflare Worker

import { remark } from "remark";
import html from "remark-html";
import dedent from "dedent";
import deflist from "@verikami/remark-deflist-revisited";

export default {
  async fetch(request, env, ctx) {

    const markdown = dedent`
      Term
      :  - item A
         - item B
         - item C
    `;

    const output = await remark()
      .use(deflist)
      .use(html)
      .process(markdown);

    return new Response(String(output), {
      headers: { "Content-Type": "text/html; charset=utf-8" }
    });
  }
};

Usage in html

<html>
  <head>
    <script type="module">
      import { remark } from "https://esm.sh/remark@15";
      import html from "https://esm.sh/remark-html@16";
      import dedent from "https://esm.sh/dedent@1";
      import deflist from "https://esm.sh/@verikami/remark-deflist-revisited";

      const render = async (markdown) => (
        await remark()
          .use(deflist)
          .use(html)
          .process(markdown)
      );

      const append = async (markdown) => {
        const output = await render(markdown);
        const el = document.getElementById("markdown");
        el.innerHTML += String(output);
      };

      const markdown = dedent`
        Term
        : - item A
          - item B
          - item C
      `;

      document.body.onload = append(markdown);

    </script>
  </head>
  <body>
    <div id="markdown"></div>
  </body>
</html>

Examples

Sample implementations are available in the ./samples directory.
They are also published as standalone repositories (templates):

Development

The interactive Sample Installer is available from version v6.0.0.

## npm
ツ npm create remark-deflist-revisited@latest

## pnpm
ツ pnpm create remark-deflist-revisited

## yarn
ツ yarn create remark-deflist-revisited

Automatic installation of Cloudflare Worker demo is available from version v0.5.22

## installer
ツ npx @verikami/remark-deflist-revisited

## latest version
ツ npx @verikami/remark-deflist-revisited@latest

## how to use 
ツ npx @verikami/remark-deflist-revisited --help

To see sample html output in terminal run

## (node): scripts/sample.node.js
ツ pnpm sample

## (bun): scripts/sample.node.js
ツ pnpm sample:bun

## (deno): scripts/sample.deno.js
ツ pnpm sample:deno

To regenerate ./demo/generated/* html files run

## (node): dist/index.js
ツ pnpm demo

## (tsx): src/index.ts
ツ pnpm demo:ts

Processing Flow

CC CI NPM JSR Socket

Markdown
   │
Plugin (wrapped remark-deflist)
   │
AST // HTML
   │
Snapshots (vitest)
   │
Build (npm) ./dist + (jsr) ./lib
   │
CI/CD (GitHub Actions)
   │
┌──────────┬─────────┬─────────┐
│ GitHub   │   NPM   │   JSR   │
│ Packages │         │         │
└──────────┴─────────┴─────────┘

License

Original work — MIT © Alex Shaw

This project is Open Source and available under the MIT License
2025 © MIT \\° veriKami °// Weronika Kami