Travis build: 720 [ci skip]

This commit is contained in:
Travis CI
2017-12-31 12:45:44 +00:00
parent 4becef4496
commit d5b7fca072
2 changed files with 2 additions and 2 deletions

View File

@ -3418,7 +3418,7 @@ byteSize('Hello World'); // 11
<br>[⬆ Back to top](#table-of-contents)
### Capitalize
### capitalize
Capitalizes the first letter of a string.

View File

@ -690,7 +690,7 @@ size({ one: 1, two: 2, three: 3 }); // 3
</code></pre></div></div><br/><div class="card fluid"><div class="section double-padded"><h3 id="bytesize">byteSize</h3></div><div class="section double-padded"><p>Returns the length of string.</p><p>Convert a given string to a <a href="https://developer.mozilla.org/en-US/docs/Web/API/Blob"><code>Blob</code> Object</a> and find its <code>size</code>.</p><pre><code class="language-js">const byteSize = str =&gt; new Blob([str]).size;
</code></pre><pre><code class="language-js">byteSize('😀'); // 4
byteSize('Hello World'); // 11
</code></pre></div></div><br/><div class="card fluid"><div class="section double-padded"><h3 id="capitalize">Capitalize</h3></div><div class="section double-padded"><p>Capitalizes the first letter of a string.</p><p>Use destructuring and <code>toUpperCase()</code> to capitalize first letter, <code>...rest</code> to get array of characters after first letter and then <code>Array.join('')</code> to make it a string again. Omit the <code>lowerRest</code> parameter to keep the rest of the string intact, or set it to <code>true</code> to convert to lowercase.</p><pre><code class="language-js">const capitalize = ([first, ...rest], lowerRest = false) =&gt;
</code></pre></div></div><br/><div class="card fluid"><div class="section double-padded"><h3 id="capitalize">capitalize</h3></div><div class="section double-padded"><p>Capitalizes the first letter of a string.</p><p>Use destructuring and <code>toUpperCase()</code> to capitalize first letter, <code>...rest</code> to get array of characters after first letter and then <code>Array.join('')</code> to make it a string again. Omit the <code>lowerRest</code> parameter to keep the rest of the string intact, or set it to <code>true</code> to convert to lowercase.</p><pre><code class="language-js">const capitalize = ([first, ...rest], lowerRest = false) =&gt;
first.toUpperCase() + (lowerRest ? rest.join('').toLowerCase() : rest.join(''));
</code></pre><pre><code class="language-js">capitalize('fooBar'); // 'FooBar'
capitalize('fooBar', true); // 'Foobar'