diff --git a/snippets/countVowels.md b/snippets_archive/countVowels.md similarity index 100% rename from snippets/countVowels.md rename to snippets_archive/countVowels.md diff --git a/snippets_archive/removeVowels.md b/snippets_archive/removeVowels.md new file mode 100644 index 000000000..e3558cb36 --- /dev/null +++ b/snippets_archive/removeVowels.md @@ -0,0 +1,15 @@ +### removeVowels + +Returns all the vowels in a `str` replaced by `repl`. + +Use `String.replace()` with a regexp to replace all vowels in `str`. +Omot `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" +``` diff --git a/tag_database b/tag_database index a1a0c2388..4981f6476 100644 --- a/tag_database +++ b/tag_database @@ -18,7 +18,6 @@ compact:array compose:function copyToClipboard:browser,string,advanced countOccurrences:array -countVowels:string createElement:browser,utility createEventHub:browser,event,advanced currentURL:browser,url