JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q45297F
  • License MIT

hanzi to pinyin for nodejs

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

Build Status npm npm Github file size

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 ')
    });
});