JSPM

  • Created
  • Published
  • Downloads 87
  • Score
    100M100P100Q111125F
  • License MIT

Get some information about one or more characters.

Package Exports

  • pinyin-utils

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 (pinyin-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Pinyin Utils

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

Install

npm install pinyin-utils

Usage

const utils = require('pinyin-utils')
console.log(utils.getToneNumber('shì'))   // 4
console.log(utils.getToneNumber('shi4'))  // 4
console.log(utils.removeTone('wǒ'))       // wo
console.log(utils.removeTone('wo3'))      // wo
console.log(utils.markToNumber('lǜ'))     // lü4
console.log(utils.numberToMark('lü4'))    // lǜ
console.log(utils.capitalize('hǎo'))      // Hǎo
console.log(utils.capitalize('hao3'))     // Hao3

Contributing

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