New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

satteri

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

satteri

High-performance Markdown and MDX processing

Source
npmnpm
Version
0.10.2
Version published
Weekly downloads
2.5M
19.53%
Maintainers
1
Weekly downloads
 
Created
Source

satteri

Native-enhanced Markdown parsing and processing for JavaScript. Parse and compile in Rust, create flexible plugins in JavaScript.

Check out the documentation for installation instructions, the API reference, and usage examples, try it online on the playground, or join us on Discord!

Install

npm install satteri
yarn add satteri
pnpm add satteri

Usage

Markdown to HTML

import { markdownToHtml } from "satteri";

const { html } = markdownToHtml("# Hello\n\nWorld");
// <h1>Hello</h1>\n<p>World</p>

MDX to JS

import { mdxToJs } from "satteri";

const { code } = mdxToJs("# Hello\n\n<MyComponent />");

Markdown to JS

Like mdxToJs, but the source is plain Markdown: {...} expressions, JSX tags, and import/export lines are ordinary text instead of MDX syntax.

import { markdownToJs } from "satteri";

const { code } = markdownToJs("# Hello\n\n{not an expression}");

With plugins

All three functions accept mdastPlugins (operate on the Markdown AST) and hastPlugins (operate on the HTML AST). A plugin is an object with a name and a visitor per node type; defineMdastPlugin / defineHastPlugin add type inference.

import { markdownToHtml, defineMdastPlugin } from "satteri";

const stripInlineCode = defineMdastPlugin({
  name: "strip-inline-code",
  inlineCode(node, ctx) {
    ctx.replaceNode(node, { type: "text", value: node.value });
  },
});

const { html } = markdownToHtml("Use `let` instead of `var`.", {
  mdastPlugins: [stripInlineCode],
});
// <p>Use let instead of var.</p>

If you're familiar with the unified ecosystem, mdast and hast plugins are similar to remark and rehype plugins, respectively, reusing the same AST shapes.

Development

Refer to CONTRIBUTING.md for development setup and workflow details.

FAQs

Package last updated on 18 Aug 2026

Related posts