Socket
Socket
Sign inDemoInstall

js-pinyin

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    js-pinyin

汉字转换拼音,需要es6语法(let、class等)支持,不依赖其他组件


Version published
Maintainers
1
Install size
177 kB
Created

Readme

Source

汉字转拼音

把汉字转化为拼音字母,由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'));

Keywords

FAQs

Last updated on 30 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc