JSPM

  • Created
  • Published
  • Downloads 21
  • Score
    100M100P100Q72810F
  • License MIT

Node wrapper for the MDBG database

Package Exports

  • mdbg
  • mdbg/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mdbg) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

MDBG

npm version Travis Build Status Coverage Status dependency status dev dependency status MIT-licensed chat on gitter

Install

npm install mdbg

Usage

const mdbg = require('mdbg')
mdbg.get('苹果')
// {
//   "traditional": "蘋果",
//   "simplified": "苹果",
//   "data": {
//     "ping2 guo3": {
//       "mandarin": "píng guó",
//       "definitions": [
//         "apple"
//       ],
//       "classifiers": {
//         "ge4": {
//           "traditional": "個",
//           "simplified": "个",
//           "mandarin": "gè",
//           "definition": "classifier for people or objects in general"
//         },
//         "ke1": {
//           "traditional": "顆",
//           "simplified": "颗",
//           "mandarin": "kē",
//           "definition": "classifier for small spheres, pearls, corn grains, teeth, hearts, satellites etc"
//         }
//       }
//     }
//   }
// }
mdbg.get('嗎')
// {
//   "traditional": "嗎",
//   "simplified": "吗",
//   "data": {
//     "ma3": {
//       "mandarin": "mǎ",
//       "definitions": [
//         "see 嗎啡|吗啡, morphine"
//       ]
//     },
//     "ma5": {
//       "mandarin": "ma",
//       "definitions": [
//         "(question particle for \"yes-no\" questions)"
//       ]
//     }
//   }
// }

Contributing

If you have a question, found a bug or want to propose a feature, have a look at the issues page.