trnct
Version:
Truncate all specified vowels from given word unless it is the first character
50 lines (31 loc) • 1.94 kB
Markdown
# trnct
[](https://travis-ci.com/vladimyr/trnct) [](https://packagephobia.now.sh/result?p=trnct) [](https://npm.im/trnct) [](https://github.com/vladimyr/trnct/blob/master/LICENSE) [](https://github.com/Flet/semistandard)
> Truncate vowels ~ `e`ℹ️🅾️
[](https://forthebadge.com) [](https://forthebadge.com)
## Instalation
$ npm install trnct
## Usage
```js
const trnct = require('trnct');
trnct('vowels');
//=> 'vwls'
```
## API
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
#### Table of Contents
- [trnct](#trnct)
- [Parameters](#parameters)
- [Examples](#examples)
### trnct
Truncate all specified vowels from given word unless it is the first character
#### Parameters
- `str` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** input
- `vowels` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** vowels to truncate (optional, default `['e','i','o']`)
#### Examples
```javascript
trnct('extension');
//=> 'extnsn'
trnct('extension', 'ei');
//=> 'extnson'
```
Returns **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** truncated string