1.0.6 • Published 2 years ago

@iwater/mdict-ts v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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>