mdict-ts
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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(fileFile)
    
    mdict.getWordList(query, offset?): Promise<Array<{ word: string, offset: number }>>
    mdict.getDefinition(offset)Promise<string> 

/mdict-ts/

    Package Sidebar

    Install

    npm i mdict-ts

    Weekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    55 kB

    Total Files

    16

    Last publish

    Collaborators

    • zhangchen915