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

10.0.1 • Public • Published

mdict-js

this is forked form js-mdict. Very Thanks to terasum

Changes

v10

  • if ext of file is mdx, the keys will be cached in memory.

v1(deprecated)

  • add mixed mode. 'stripkey' and 'keyCaseSensitive' will be ignored in this mode (only lookup function and mdx file), lookup will return an array contains all words matched (stripKey and lowercase). this mode will take some time to boot.
    const Mdict = require('mdict-js')
    const dict = new Mdict('path/xxx.mdx', {
      mode: 'mixed'
    })
    
    const res = dict.lookup('be')
    console.log(res)
    /**
    [
      { keyText: 'be', definition: 'xxx' },
      { keyText: 'Be', definition: 'xxx' },
      { keyText: 'be-', definition: 'xxx' }
    ]
    **/
    

Package Sidebar

Install

npm i mdict-js

Weekly Downloads

2

Version

10.0.1

License

MIT

Unpacked Size

465 kB

Total Files

52

Last publish

Collaborators

  • tonyzhou1890