# @yandeu/parse-markdown

> Easily parse your markdown files.

Latest version **0.0.2** (published 2022-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @yandeu/parse-markdown
pnpm add @yandeu/parse-markdown
yarn add @yandeu/parse-markdown
bun add @yandeu/parse-markdown
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2022-06-16 |
| First published | 2021-05-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12 |
| Dependencies | 9 |
| Unpacked size | 11.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Yannick Deubel |
| Maintainers | yandeu |

## Links

- npm: https://www.npmjs.com/package/@yandeu/parse-markdown
- Repository: https://github.com/yandeu/parse-markdown
- Homepage: https://github.com/yandeu/parse-markdown#readme
- Issues: https://github.com/yandeu/parse-markdown/issues
- Funding: https://github.com/sponsors/yandeu
- npm.io page: https://npm.io/package/@yandeu/parse-markdown

## Dependencies (9)

- [yaml](https://npm.io/package/yaml.md) ^2.1.1
- [unified](https://npm.io/package/unified.md) ^10.1.2
- [rehype-raw](https://npm.io/package/rehype-raw.md) ^6.1.1
- [remark-gfm](https://npm.io/package/remark-gfm.md) ^3.0.1
- [remark-parse](https://npm.io/package/remark-parse.md) ^10.0.1
- [remark-rehype](https://npm.io/package/remark-rehype.md) ^10.1.0
- [rehype-stringify](https://npm.io/package/rehype-stringify.md) ^9.0.3
- [remark-stringify](https://npm.io/package/remark-stringify.md) ^10.0.2
- [remark-frontmatter](https://npm.io/package/remark-frontmatter.md) ^4.0.1

## Recent versions

- 0.0.2 (latest) — 2022-06-16
- 0.0.1 — 2021-05-26
- 0.0.0 — 2021-05-26

## README

# Parse Markdown

```bash
npm i @yandeu/parse-markdown
```

## Three simple steps

1\) Input

```md
---
test: true
list:
  - one
  - two
---

# hello

This is a paragraph.
```

2\) Code

```ts
import fs from 'fs/promises'
import { parseMarkdown } from '@yandeu/parse-markdown'

const main = async () => {
  const data = await fs.readFile('test.md', { encoding: 'utf-8' })
  const md = await parseMarkdown(data) // Promise<{ markdown: string; yaml: {}; }>
  console.log(md)
}
main()
```

3\) Output

```json
{
  "markdown": "<h1>hello</h1>\n<p>This is a paragraph.</p>",
  "yaml": { "test": true, "list": ["one", "two"] }
}
```

---

Need more? Make a [pull request](https://github.com/yandeu/parse-markdown)!

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