# @iwater/mdict-ts

> mdict (*.mdx, *.mdd) file reader

Latest version **1.0.6** (published 2022-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @iwater/mdict-ts
pnpm add @iwater/mdict-ts
yarn add @iwater/mdict-ts
bun add @iwater/mdict-ts
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2022-04-12 |
| First published | 2022-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 50.4 KB |
| Known vulnerabilities | 0 (+17 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | iwater |
| Maintainers | iwater |
| Keywords | mdict, ts, dictionary, mdx, mdd |

## Links

- npm: https://www.npmjs.com/package/@iwater/mdict-ts
- Repository: https://github.com/iwater/mdict-ts
- Issues: https://github.com/iwater/mdict-ts/issues
- npm.io page: https://npm.io/package/@iwater/mdict-ts

## Dependencies (6)

- [pako](https://npm.io/package/pako.md) ^1.0.11
- [xmldom](https://npm.io/package/xmldom.md) ^0.3.0
- [@types/node](https://npm.io/package/@types/node.md) ^14.18.12
- [@types/pako](https://npm.io/package/@types/pako.md) ^1.0.1
- [text-encoding](https://npm.io/package/text-encoding.md) ^0.7.0
- [buffer-dataview](https://npm.io/package/buffer-dataview.md) 0.0.2

## 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.0.6 (latest) — 2022-04-12
- 1.0.5 — 2022-04-09
- 1.0.4 — 2022-04-09
- 1.0.3 — 2022-04-09
- 1.0.2 — 2022-04-09

## README

## mdict-ts

mdict (*.mdx, *.mdd) file reader
modify to fix error from [mdict-ts](https://github.com/zhangchen915/mdict-ts)
which rewrite form [mdict-js](https://github.com/fengdh/mdict-js)

#### Note:

Because of TextDecoder API , mdict-ts don't support IE and Edge , but you can use polyfill such as `text-encoding`.

#### Installation:

`npm i @iwater/mdict-ts`

#### Usage:

```ts
    import {Mdict} from '@iwater/mdict-ts'
    const mdict = await Mdict.build(file: File)
    
    mdict.getWordList(query, offset?): Promise<Array<{ word: string, offset: number }>>
    mdict.getDefinition(offset): Promise<string> 
```

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