https://github.com/ehanlin/language-utils
https://github.com/ehanlin/language-utils
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ehanlin/language-utils
- Owner: eHanlin
- License: mit
- Created: 2018-03-08T07:22:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-26T06:11:36.000Z (about 8 years ago)
- Last Synced: 2025-10-11T13:46:52.723Z (8 months ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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');
```