
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@feiye/pinyin
Advanced tools
轻量级,满足大部分场景需求
npm仓库中已经存在大量拼音转换库,为何还要再造一个轮子? 我们在尝试过几个排名较高的库之后发现,他们做的都太重了,并且无法满足关键词断句组合功能。(MySQL全文搜索有效关键词提取)
$ npm i @feiye/pinyin
import { pinyin, pinyinInitial, pinyinKeywords } from '@feiye/pinyin';
汉子句子转换为拼音
pinyin("中华人民共和国 Peoples Republic of China");
// output: "zhong hua ren min gong he guo Peoples Republic of China"
首字母索引
pinyinInitial("中");
// output: "Z"
MySQL 数据库的原生全文搜索
pinyinKeywords("中华人民共和国abcde0123,hello电梯 维修工,从事T22维修20年h3c world");
// output:
[
'zhonghua',
'huaren',
'renmin',
'mingong',
'gonghe',
'heguo',
'abcde0123',
'hello',
'dianti',
'weixiu',
'xiugong',
'congshi',
'T22',
'20',
'h3c',
'world',
]
FAQs
We found that @feiye/pinyin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.