@iwater/mdict-ts
v1.0.6
Published
mdict (*.mdx, *.mdd) file reader
Downloads
32
Readme
mdict-ts
mdict (*.mdx, *.mdd) file reader modify to fix error from mdict-ts which rewrite form 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:
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>