Update and rename noVowels.md to removeVowels.md

This commit is contained in:
Angelos Chalaris
2018-01-09 14:20:08 +02:00
committed by GitHub
parent 26959910a1
commit 3f34154c57
2 changed files with 14 additions and 14 deletions

14
snippets/removeVowels.md Normal file
View File

@@ -0,0 +1,14 @@
### removeVowels
Returns all the vowels in a `str` replaced by `repl`.
Skip `repl` to use a default value of `''`
```js
const removeVowels = (str,repl = '') => str.replace(/[aeiou]/gi,repl)
```
```js
removeVowels("foobAr"); // "fbr"
removeVowels("foobAr","*"); // "f**b*r"
```