Generated readme, index and tag_database for countVowels
This commit is contained in:
16
README.md
16
README.md
@ -110,6 +110,7 @@
|
||||
* [`anagrams`](#anagrams)
|
||||
* [`capitalize`](#capitalize)
|
||||
* [`capitalizeEveryWord`](#capitalizeeveryword)
|
||||
* [`countVowels`](#countvowels)
|
||||
* [`escapeRegExp`](#escaperegexp)
|
||||
* [`fromCamelCase`](#fromcamelcase)
|
||||
* [`reverseString`](#reversestring)
|
||||
@ -1452,6 +1453,21 @@ const capitalizeEveryWord = str => str.replace(/\b[a-z]/g, char => char.toUpperC
|
||||
|
||||
[⬆ back to top](#table-of-contents)
|
||||
|
||||
### countVowels
|
||||
|
||||
Retuns `number` of vowels in provided string.
|
||||
|
||||
Use a regular expression to count number of vowels `(A, E, I, O, U)` in a `string`.
|
||||
|
||||
```js
|
||||
const countVowels = str =>
|
||||
return (str.match(/[aeiou]/ig) || []).length;
|
||||
// countVowels('foobar') -> 3
|
||||
// countVowels('gym') -> 0
|
||||
```
|
||||
|
||||
[⬆ back to top](#table-of-contents)
|
||||
|
||||
### escapeRegExp
|
||||
|
||||
Escapes a string to use in a regular expression.
|
||||
|
||||
@ -133,6 +133,7 @@
|
||||
</h3><a class="sublink-1" href="#anagrams">anagrams</a>
|
||||
<a class="sublink-1" href="#capitalize">capitalize</a>
|
||||
<a class="sublink-1" href="#capitalizeeveryword">capitalizeEveryWord</a>
|
||||
<a class="sublink-1" href="#countvowels">countVowels</a>
|
||||
<a class="sublink-1" href="#escaperegexp">escapeRegExp</a>
|
||||
<a class="sublink-1" href="#fromcamelcase">fromCamelCase</a>
|
||||
<a class="sublink-1" href="#reversestring">reverseString</a>
|
||||
@ -884,6 +885,14 @@ Omit the <code>lowerRest</code> parameter to keep the rest of the string intact,
|
||||
<pre><code class="language-js">const capitalizeEveryWord = str => str.replace(/\b[a-z]/g, char => char.toUpperCase());
|
||||
// capitalizeEveryWord('hello world!') -> 'Hello World!'
|
||||
</code></pre>
|
||||
</div></div><br/><div class="card fluid"><div class="section double-padded"><h3 id="countvowels">countVowels</h3></div><div class="section double-padded">
|
||||
<p>Retuns <code>number</code> of vowels in provided string.</p>
|
||||
<p>Use a regular expression to count number of vowels <code>(A, E, I, O, U)</code> in a <code>string</code>.</p>
|
||||
<pre><code class="language-js">const countVowels = str =>
|
||||
return (str.match(/[aeiou]/ig) || []).length;
|
||||
// countVowels('foobar') -> 3
|
||||
// countVowels('gym') -> 0
|
||||
</code></pre>
|
||||
</div></div><br/><div class="card fluid"><div class="section double-padded"><h3 id="escaperegexp">escapeRegExp</h3></div><div class="section double-padded">
|
||||
<p>Escapes a string to use in a regular expression.</p>
|
||||
<p>Use <code>replace()</code> to escape special characters.</p>
|
||||
|
||||
@ -15,6 +15,7 @@ collatz:math
|
||||
compact:array
|
||||
compose:function
|
||||
countOccurrences:array
|
||||
countVowels:string
|
||||
currentURL:browser
|
||||
curry:function
|
||||
deepFlatten:array
|
||||
|
||||
Reference in New Issue
Block a user