# satteri

> High-performance Markdown and MDX processing

Latest version **0.10.5** (published 2026-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install satteri
pnpm add satteri
yarn add satteri
bun add satteri
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.10.5 |
| Published | 2026-08-19 |
| First published | 2026-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 362 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1253 |
| Maintainers | princesseuh |

## Links

- npm: https://www.npmjs.com/package/satteri
- Repository: https://github.com/bruits/satteri
- npm.io page: https://npm.io/package/satteri

## Dependencies (4)

- [@types/hast](https://npm.io/package/@types/hast.md) ^3.0.5
- [@types/mdast](https://npm.io/package/@types/mdast.md) ^4.0.4
- [@types/unist](https://npm.io/package/@types/unist.md) ^3.0.3
- [@types/estree-jsx](https://npm.io/package/@types/estree-jsx.md) ^1.0.5

## Recent versions

- 0.10.5 (latest) — 2026-08-19
- 0.10.4 — 2026-08-19
- 0.10.3 — 2026-08-19
- 0.10.2 — 2026-08-18
- 0.10.1 — 2026-08-18
- 0.10.0 — 2026-08-18
- 0.9.5 — 2026-07-08
- 0.9.4 — 2026-06-29
- 0.9.3 — 2026-06-25
- 0.9.2 — 2026-06-23
- 0.9.1 — 2026-06-19
- 0.9.0 — 2026-06-19
- 0.8.1 — 2026-06-08
- 0.8.0 — 2026-06-03
- 0.7.0 — 2026-06-03
- … 25 more at https://npm.io/package/satteri/versions

## README

# satteri

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

Check out the [documentation](https://satteri.bruits.org/docs/) for [installation instructions](https://satteri.bruits.org/docs/installation/), the [API reference](https://satteri.bruits.org/docs/entry-points/), and [usage examples](https://satteri.bruits.org/docs/quick-start/), try it online on the [playground](https://satteri.bruits.org/playground), or join us on [Discord](https://discord.com/invite/84pd4QtmzA)!

## Install

```sh
npm install satteri
yarn add satteri
pnpm add satteri
```

## Usage

### Markdown to HTML

```ts
import { markdownToHtml } from "satteri";

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

### MDX to JS

```ts
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.

```ts
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.

```ts
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](https://github.com/bruits/satteri/blob/main/CONTRIBUTING.md) for development setup and workflow details.

---
_Source: https://npm.io/package/satteri · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
