1.0.1 • Published 8 years ago

initial-of v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

Installation

npm install initial-of

Absolute

This module is used to get the initial of Chinese character

Example

var initial = require('initial-of');

/** 
 * get all initials of Chinese characters, 
 * including polyphone and the combination
 */
initial.getInitialAll('王府井');
// output: 'WFJ'

/** 
 * get all initials of Chinese characters, 
 * including polyphone and the combination
 */
initial.getInitialAll('王府井');
// output: 'WFJ'

/** 
 * get all initials of Chinese characters, 
 * one of combination of polyphone
 */
initial.getInitialOne('王府井');
// output: 'WFJ'

/** 
 * get initial of the first of Chinese characters, 
 * one of combinations
 */
initial.getInitialOneOfFirst('王府井');
// output: 'W'