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

@webority/markdown-core

v0.157.0

Published

The platform-neutral engine every Webority renderer and chat reads: the markdown grammar (block and inline parsing, the link rule and plain-text extraction) and, under ./chat, the assistant chat engine (server client, stream reader, wording and conversati

Readme

@webority/markdown-core

The one markdown grammar every Webority renderer reads. It turns a markdown string into blocks and inline tokens, decides what a link may open, and extracts plain text. It draws nothing and touches no platform API, so AppMarkdown (React), <wui-markdown> and <app-markdown> (Razor pages) and the phone Markdown all draw the same document from the same rules.

| Export | What it does | | --- | --- | | parseMarkdown(source) | the blocks: paragraph, heading, list (nested by depth), table, code, quote, rule | | parseInline(text, options?) | the inline tokens: text, code, strong, em, strike, link, image, citation | | splitCitations(text, isCitation) | the plain text split at its [inner] runs: { text } parts and { citation } parts, a run isCitation rejects stays text | | CITATION_RUN | the one citation pattern: [inner] not followed by (, inner non-empty with no bracket or line break | | linkTarget(href, links, resolveLink, origin?, base?) | what a link opens: an app route, a page of this site (a relative address, or a web address on origin), a web address, a mail or phone address, or nothing. With base (an origin from linkBase) a relative address resolves against it first | | linkBase(value) | the origin a relative link resolves against: an https origin with no path, query, fragment or credentials (a trailing / allowed), without it; anything else is null | | webRoute(target) | the web route of a resolved app link | | markdownToPlainText(source) | the text a screen reader, a preview or a search index reads | | FigureRun | the type a figureText splitter returns: { kind: "text" \| "sub" \| "sup", text }; a sub or sup run draws lowered or raised |

links is "web" (open web, mail and phone addresses), "app" (open only what resolveLink resolves to an in-app route) or "page". In "page" mode resolveLink is asked about every address, and a relative address or a web address on origin draws as a page link; other web and contact addresses stay text. Chat replies use "app", because model output must not send a person off the app.

Citations are chat-only. parseInline(text, { isCitation }) reads an [inner] run that is not a link as a citation token ({ type: "citation", text: inner }) when isCitation(inner) returns true; without isCitation, no run is a citation. Citations are read inside bold, italics and strike, never inside a link label or image alt text, and an escaped \[ is never a citation. splitCitations applies the same rule to plain text for renderers that do not parse inline tokens.