# remark-toc-stdin

> A helper module that lets you add page numbers in TOC to your html output

Latest version **0.2.1** (published 2020-12-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install remark-toc-stdin
pnpm add remark-toc-stdin
yarn add remark-toc-stdin
bun add remark-toc-stdin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2020-12-09 |
| First published | 2020-11-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | david weil |
| Maintainers | tenuki |
| Keywords | markdown, toc, page, index |

## Links

- npm: https://www.npmjs.com/package/remark-toc-stdin
- Homepage: https://github.com/tenuki/remark-toc-stdin
- npm.io page: https://npm.io/package/remark-toc-stdin

## Dependencies (4)

- [strip-bom](https://npm.io/package/strip-bom.md) ^4.0.0
- [markdown-it](https://npm.io/package/markdown-it.md) ^12.0.2
- [markdown-it-anchor](https://npm.io/package/markdown-it-anchor.md) ^6.0.0
- [markdown-it-table-of-contents](https://npm.io/package/markdown-it-table-of-contents.md) ^0.5.1

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2020-12-09
- 0.2.0 — 2020-11-23
- 0.1.1 — 2020-11-08
- 0.1.0 — 2020-11-08

## README

# a remark-toc helper module

This module lets you add TOC with page numbers to your html output.

Usage:
```javascript
const remark_toc_stdin = require('remark-toc-stdin');

remark_toc_stdin.main(my_get_pagenr_func)
```

where `my_get_pagenr_func` is a function like this:

```javascript
function get_pagenr(heading, link, md_object) {
     const pagenr = resolve_pagenr_for_heading(heading);
     return pagenr.toString();
}
```

This modules enable us to implement toc with indexed pages in: [amd2pdf
](https://github.com/tenuki/amd2pdf).

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