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

typedoc-plugin-linkrewriter

v0.1.1

Published

A TypeDoc plugin for rewriting links in markdown

Downloads

34

Readme

typedoc-plugin-linkrewriter

A plugin for TypeDoc for rewriting links in markdown.

Installation

npm install --save-dev typedoc typedoc-plugin-linkrewriter

Usage

typedoc --rewriteLinks path/to/linkrewriter.json

The LinkRewriter plugin recognizes the following link formats supported by Github Flavored Markdown:

Arguments

This plugin adds the following additional arguments to TypeDoc:

--rewriteLinks

The path to a JSON file or JS file exporting a Links object.

A Links object is an object where each key is parsed as a regular expression pattern and each value is either a replacement string or a replacer function:

interface Links {
    [pattern: string]: string | LinkRewriter;
}

type LinkRewriter = (this: LinkRewriterContext, matched: string, ...args: any[]) => string;

interface LinkRewriterContext {
    project?: ProjectReflection;
    reflection?: DeclarationReflection;
    url?: string;
    file?: string;
}

Example (JSON)

{
    "^packages/([^/]+)(?:#readme|/README.md)": "modules/$1.html"
}

Example (JS)

module.exports = {
    // maps 'packages/foo-bar#readme' to 'modules/foo_bar.html'
    [String.raw`^packages/([^/]+)(?:#readme|/README.md)`](_, name) {
        return `modules/${name.replace(/-/g, "_")}.html`;
    },
    // maps '../foo-bar#readme' to './foo_bar.html'
    [String.raw`^\.\./([^/]+)(?:#readme|/README.md)`](_, name) {
        return `./${name.replace(/-/g, "_")}.html`;
    },
}