An open API service indexing awesome lists of open source software.

https://github.com/ehanlin/language-utils


https://github.com/ehanlin/language-utils

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

language-utils
=========================

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

## Install

```sh
npm install language-utils
```

## Usage

Like this if you want to decorate highlighted letter.

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

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

You can highlight the vowel, too.

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

Get speech text of `zh`.

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