npm.io
1.0.6 • Published 4 years ago

@iwater/mdict-ts

Licence
MIT
Version
1.0.6
Deps
6
Size
50 kB
Vulns
17
Weekly
0
Stars
2

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> 

Keywords