Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

js-pinyin

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-pinyin - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

index.js

@@ -8,3 +8,3 @@ /**

let pinyin = new (require('./pinyin'))({charCase:2});
let pinyin = new (require('./pinyin'))({charCase:0});
/*console.log(pinyin.getFullChars('管理员'))

@@ -11,0 +11,0 @@ console.log(pinyin.getCamelChars('管理员'))

{
"name": "js-pinyin",
"version": "0.1.2",
"version": "0.1.3",
"description": "汉字转换拼音,需要es6语法(let、class等)支持,不依赖其他组件",

@@ -5,0 +5,0 @@ "private": false,

# 汉字转拼音
把汉字转化为拼音字母,由[chinalu/JSPinyin](https://github.com/chinalu/JSPinyin)改写,使用新语法并去掉mootools的依赖
# 安装
`npm install js-pinyin`<br/>
`import pinyin from 'js-pinyin'`
# 使用示例
``let pinyin = require('js-pinyin');
console.log(pinyin.getFullChars('管理员'))
console.log(pinyin.getCamelChars('管理员'))
console.log(pinyin.getCamelChars('1234'))
console.log(pinyin.getCamelChars('english'))``
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc