跟进输入的名称获取首字母
npm install js-pinyin
let pinyin = require("js-pinyin");
pinyin.setOptions({ checkPolyphone: false, charCase: 1 });
console.log(pinyin.getCamelChars('关羽'));
跟进输入的名称获取首字母
npm install js-pinyin
let pinyin = require("js-pinyin");
pinyin.setOptions({ checkPolyphone: false, charCase: 1 });
console.log(pinyin.getCamelChars('关羽'));