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

rumdl-wasm

v0.0.199

Published

Fast markdown linter with 60+ rules - WebAssembly build

Downloads

1,375

Readme

rumdl-wasm

Fast markdown linter with 60+ rules, compiled to WebAssembly.

Installation

npm install rumdl-wasm

Quick Start

import init, { lint_markdown, apply_all_fixes } from 'rumdl-wasm';

// Initialize the WASM module
await init();

// Lint markdown content
const content = '# Hello World\n\nSome text here...';
const warnings = JSON.parse(lint_markdown(content));

// Apply all auto-fixes
const fixed = apply_all_fixes(content);

API Reference

init()

Initialize the WASM module. Must be called before using other functions.

await init();

lint_markdown(content: string): string

Lint markdown content and return warnings as JSON.

const warnings = JSON.parse(lint_markdown(content));

Returns a JSON array of warnings (see Warning Format below).

apply_all_fixes(content: string): string

Apply all available auto-fixes to the content.

const fixed = apply_all_fixes(content);

Returns the fixed content string.

apply_fix(content: string, fix_json: string): string

Apply a single fix to the content.

const fix = JSON.stringify({ start: 0, end: 5, replacement: 'Hello' });
const fixed = apply_fix(content, fix);

get_version(): string

Get the rumdl version.

const version = get_version(); // e.g., "0.0.185"

get_available_rules(): string

Get list of available rules as JSON.

const rules = JSON.parse(get_available_rules());
// [{ name: "MD001", description: "Heading levels should only increment by one level at a time" }, ...]

Warning Format

Each warning object contains:

interface Warning {
  rule: string;        // Rule name (e.g., "MD001")
  message: string;     // Warning message
  line: number;        // 1-indexed line number
  column: number;      // 1-indexed column number
  end_line: number;    // 1-indexed end line
  end_column: number;  // 1-indexed end column
  severity: string;    // "Error" or "Warning"
  fix?: {              // Optional auto-fix
    start: number;     // Byte offset start
    end: number;       // Byte offset end
    replacement: string;
  };
}

Browser Usage

ES Module

<script type="module">
  import init, { lint_markdown } from './rumdl_wasm.js';

  async function main() {
    await init();
    const warnings = JSON.parse(lint_markdown('# Test'));
    console.log(warnings);
  }

  main();
</script>

With CDN (unpkg)

<script type="module">
  import init, { lint_markdown } from 'https://unpkg.com/rumdl-wasm/rumdl_wasm.js';

  await init();
  console.log(JSON.parse(lint_markdown('# Test')));
</script>

Node.js Usage

import init, { lint_markdown, apply_all_fixes } from 'rumdl-wasm';
import { readFile } from 'fs/promises';

await init();

const content = await readFile('README.md', 'utf-8');
const warnings = JSON.parse(lint_markdown(content));

for (const w of warnings) {
  console.log(`${w.line}:${w.column} ${w.rule} ${w.message}`);
}

Bundler Usage

Vite

// vite.config.js
export default {
  optimizeDeps: {
    exclude: ['rumdl-wasm']
  }
};
// main.js
import init, { lint_markdown } from 'rumdl-wasm';

await init();
const warnings = JSON.parse(lint_markdown(content));

Webpack 5

// webpack.config.js
module.exports = {
  experiments: {
    asyncWebAssembly: true
  }
};

TypeScript

TypeScript definitions are included. The package exports all functions with proper types.

import init, { lint_markdown, apply_all_fixes, get_version } from 'rumdl-wasm';

await init();

const warnings: Warning[] = JSON.parse(lint_markdown(content));
const fixed: string = apply_all_fixes(content);
const version: string = get_version();

License

MIT