1.0.1 • Published 1 year ago

mdict-ts-chrome v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

mdict-ts

mdict (.mdx, .mdd) file reader 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 mdict-ts

Usage:

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