js-pinyin
汉字转换拼音,需要es6语法(let、class等)支持,不依赖其他组件
Last updated 3 years ago by waterchestnut .
MIT License · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install js-pinyin 
SYNC missed versions from official npm registry.

汉字转拼音

把汉字转化为拼音字母,由chinalu/JSPinyin改写,使用新语法并去掉mootools的依赖

安装

npm install js-pinyin

import pinyin from 'js-pinyin'

使用示例

let pinyin = require('js-pinyin');

pinyin.setOptions({checkPolyphone: false, charCase: 0});

console.log(pinyin.getFullChars('管理员'));
console.log(pinyin.getCamelChars('管理员'));
console.log(pinyin.getCamelChars('1234'));
console.log(pinyin.getCamelChars('english'));

Current Tags

  • 0.1.9                                ...           latest (3 years ago)

5 Versions

  • 0.1.9                                ...           3 years ago
  • 0.1.6                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |