Package Exports
- siwi-pinyin
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 (siwi-pinyin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
siwi-pinyin
hanzi to pinyin for nodejs
install
yarn add siwi-pinyin
npm install siwi-pinyin
test
const expect = require('chai').expect
describe('/lib/index.js', () => {
it('convert',async () => {
const pinyin = require('../index')
const hanzi = '还好,欢迎光临';
const res = await pinyin.convert(hanzi)
console.log(res)
expect(res).to.be.equal('hái hǎo ,huān yíng guāng lín ')
});
});