npm.io
0.0.11 • Published 8 years ago

language-utils

Licence
MIT
Version
0.0.11
Deps
0
Size
7 kB
Vulns
0
Weekly
0

language-utils

The language-utils offers some utility features, such as highlight.

Install

npm install language-utils

Usage

Like this if you want to decorate highlighted letter.

var languageUtils = require('language-utils');

//print ma**d**e
var result = languageUtils.English.highlight('made', 'make', (c)=> `**${c}**`);

You can highlight the vowel, too.

//print [ˋv<aʊ><ə>l]
languageUtils.English.highlightVowel('[ˋvaʊəl]', (c)=> `<${c}>`);

Get speech text of zh.

language.English.getSpeechText('adj.', 'zh');