Update and rename noVowels.md to removeVowels.md
This commit is contained in:
@ -1,14 +0,0 @@
|
|||||||
### noVowels
|
|
||||||
|
|
||||||
Returns all the vowels in a `str` replaced by `repl`.
|
|
||||||
|
|
||||||
Skip `repl` to use a default value of `''`
|
|
||||||
|
|
||||||
```js
|
|
||||||
const noVowels = (str,repl = '') => str.replace(/[aeiou]/gi,repl)
|
|
||||||
```
|
|
||||||
|
|
||||||
```js
|
|
||||||
noVowels("foobAr"); // "fbr"
|
|
||||||
noVowels("foobAr","*"); //f**b*r
|
|
||||||
```
|
|
||||||
14
snippets/removeVowels.md
Normal file
14
snippets/removeVowels.md
Normal 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"
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user