How to use js-mdict - 2 common examples

To help you get started, we’ve selected a few js-mdict examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github terasum / medict / src / background / bgworker / bg.worker.js View on Github external
function loadMDD (mddpath) {
  // TODO change mdd file path
  if (!fs.existsSync(mddpath) || !mddpath.endsWith('.mdd')) {
    console.log('bgworker mdd file path not exist return')
  // const mddpath = path.join(__static, 'dicts/oale8.mdd')
  MDDDict.jsmdict = new JSMdict(mddpath)
  MDDDict.loaded = true
  console.log('mdd loaded...')
github terasum / medict / src / renderer / store / modules / medict.js View on Github external
loadDict ({commit, state, getters}) {
    if (!state.dict.inited) {
      const cssPath = path.join(__static, './style/CollinsEC.css')
      const styleContent = fs.readFileSync(cssPath, 'utf8')
      commit(INIT_DICT_CSS, styleContent, cssPath)
      return new Mdict(state.dict.path).build()
    } else {
      console.log('dict loaded...')
  search ({commit, state, getters}, word) {


mdict (*.mdx, *.mdd) file reader

Latest version published 2 months ago

Package Health Score

68 / 100
Full package analysis

Popular js-mdict functions

Popular JavaScript code snippets

Find secure code to use in your application or website