# unofficial-chatwork-parser

> unified plugin to parse Chatwork message

Latest version **0.2.0** (published 2023-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install unofficial-chatwork-parser
pnpm add unofficial-chatwork-parser
yarn add unofficial-chatwork-parser
bun add unofficial-chatwork-parser
```

## Health

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

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

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2023-03-11 |
| First published | 2021-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 42.4 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | nnabeyang |
| Keywords | unified, unified-plugin, parser |

## Links

- npm: https://www.npmjs.com/package/unofficial-chatwork-parser
- Repository: https://github.com/nnabeyang/unofficial-chatwork-parser
- Homepage: https://github.com/nnabeyang/unofficial-chatwork-parser#readme
- Issues: https://github.com/nnabeyang/unofficial-chatwork-parser/issues
- npm.io page: https://npm.io/package/unofficial-chatwork-parser

## Dependencies (1)

- [linkify-it](https://npm.io/package/linkify-it.md) ^3.0.3

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2023-03-11
- 0.1.2 — 2023-03-11
- 0.1.1 — 2023-02-26
- 0.1.0 — 2021-12-05
- 0.0.0 — 2021-11-23

## README

# unofficial-chatwork-parser

unofficial-chatwork-parser is a unified plugin to parse Chatwork message.

# Sample

```ts
import { Options as MdOptions } from "mdast-util-to-hast"
import React from "react"
import compiler from "rehype-react"
import { Options, Root } from "rehype-react/lib"
import mdast2hast from "remark-rehype"
import { Plugin, unified } from "unified"
import parser from "unofficial-chatwork-parser"

import MyLink from "../MyLink"
import {
  infoBodyHandler,
  infoHandler,
  infoHeadingHandler,
  mensionHandler,
  piconHandler,
  piconNameHandler,
  plainHandler,
  quoteHandler,
  replyHandler,
} from "./handlers"

const processor = unified()
  .use(parser)
  .use(mdast2hast, {
    handlers: {
      info: infoHandler,
      "info-heading": infoHeadingHandler,
      "info-body": infoBodyHandler,
      quote: quoteHandler,
      mension: mensionHandler,
      reply: replyHandler,
      picon: piconHandler,
      piconname: piconNameHandler,
      plain: plainHandler,
    },
  } as MdOptions)
  .use(
    compiler as Plugin<
      [Options],
      Root,
      React.ReactElement<unknown, string | React.JSXElementConstructor<any>>
    >,
    {
      createElement: React.createElement,
      components: {
        a: MyLink,
      },
    } as Options
  )
  .freeze()
```

# License

MIT

# Author

[Noriaki Watanabe@nnabeyang](https://twitter.com/nnabeyang)

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