0.1.9 • Published 2 years ago

@springsheep/zp-pinyin v0.1.9

Weekly downloads
-
License
MIT License
Repository
github
Last release
2 years ago

汉字转拼音

把汉字转化为拼音字母,使用新语法并去掉 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'))