Coder Social home page Coder Social logo

ipxxiao / alphabetize Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.52 MB

To get chinese pinyin or alphabet from chinese. 从汉字提取拼音, 返回首字母大写形式;提取首字母,返回大写形式

Home Page: https://ipxxiao.github.io/alphabetize

License: MIT License

TypeScript 100.00%
alphabet alphabetize chinese pinyin letter

alphabetize's Introduction

Alphabetize · NPM version Build Status Coverage Status code style: prettier

To get chinese pinyin or alphabet from chinese. 从汉字提取拼音,返回首字母大写形式;提取首字母,返回大写形式。

Browsers support

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
iOS Safari
iOS Safari
Opera
Opera
IE8+ Edge+ last 10 versions last 10 versions last 2 versions last 2 versions last 2 versions

Install

npm i chinese-alphabetize -S
or
yarn add chinese-alphabetize

Usage

import Alphabetize, { getFullChars, getCamelChars } from 'chinese-alphabetize'
or
const Alphabetize, { getFullChars, getCamelChars } = require('chinese-alphabetize')

. getFullChars(提取拼音,返回首字母大写形式)

<
Alphabetize.getFullChars('张三')

->
ZhangSan

. getCamelChars(提取首字母,返回大写形式)

<
Alphabetize.getCamelChars('张三铅')
Alphabetize.getCamelChars('张三铅', { checkPolyphone: true })

->
ZSQ
['ZSQ', 'ZSY']

More

alphabetize's People

Contributors

dependabot[bot] avatar ipxxiao avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.