# functional-md

> functional markdown

Latest version **1.1.0** (published 2021-07-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install functional-md
pnpm add functional-md
yarn add functional-md
bun add functional-md
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-07-08 |
| First published | 2021-04-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | JW |
| Maintainers | jiangweixian1994 |
| Keywords | functional, markdown |

## Links

- npm: https://www.npmjs.com/package/functional-md
- Repository: https://github.com/JiangWeixian/functional-md
- npm.io page: https://npm.io/package/functional-md

## 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

- 1.1.0 (latest) — 2021-07-08
- 1.0.0-0 (next) — 2021-04-28
- 1.0.1 — 2021-04-29
- 1.0.0 — 2021-04-28
- 0.1.1 — 2021-04-27
- 0.1.0 — 2021-04-27
- 0.0.5 — 2021-04-27
- 0.0.4 — 2021-04-27

## README

# functional-md
> render markdown content functional

[![npm](https://img.shields.io/npm/v/functional-md)](https://github.com/JiangWeixian/functional-md) [![NPM](https://img.shields.io/npm/l/functional-md)](https://github.com/JiangWeixian/functional-md)

## install

```console
npm install functional-md
```

## usage

### `table`

```ts
import { table } from 'functional-md'

table({
  columns: [
    {
      dataIndex: 'id',
      title: 'ID'
    },
    {
      dataIndex: '',
      title: 'NAME',
      render: (v) => v.name
    }
  ],
  dataSource: [
    {
      id: 1,
      name: 'jw'
    },
    {
      id: 2,
      name: 'jiangweixian'
    }
  ]
})
```

will output

|ID|NAME|
|-----|-----|
|1|jw|
|2|jiangweixian|

### `menu`

```ts
menu({
  dataSource: [
    {
      title: 'jw',
      items: ["1.1", "1.2"]
    },
    {
      title: 'jiangweixian',
      items: [
        {
          title: "2.1"
        },
      ]
    },
  ]
})
```

will output

- jw
  - 1.1
  - 1.2
- jiangweixian
  - 2.1

### `list`

```ts
list({ dataSource: ['1', '2'], limit: 1 })
```

will output

- 1
- ...

### `overflow-list`

```ts
overflowList({ list: ['a', 'b', 'c'], max: 2 })
```

will output

a, b `+1`

### `badge`

```ts
badge({ value: 1 }
```

will output

`+1`

### `code`

```ts
code({ language: 'tsx', value: 'const a = 1' })
```

will output

```tsx
const a = 1
```

### `image`

```ts
image({ alt: 'alt', src: 'https://github.com' })
```

### `link`

```ts
link({ alt: 'alt', href: 'https://github.com' })
```

## features

- table
- menu
- list
- overflow-list
- badge
- code
- image
- link

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