Travis build: 646

This commit is contained in:
Travis CI
2017-12-30 10:38:21 +00:00
parent e5ef0fbe14
commit 8a55d2c91b
4 changed files with 35 additions and 3 deletions

View File

@ -259,6 +259,15 @@
</details> </details>
### _Uncategorized_
<details>
<summary>View contents</summary>
* [`byteSize`](#bytesize)
</details>
## Adapter ## Adapter
### call ### call
@ -4134,6 +4143,25 @@ validateNumber('10'); // true
<br>[⬆ Back to top](#table-of-contents) <br>[⬆ Back to top](#table-of-contents)
## _Uncategorized_
### byteSize
Returns the length of string.
Convert a given string to a [`Blob` Object](https://developer.mozilla.org/en-US/docs/Web/API/Blob) and find its `size`.
```js
const byteSize = str => new Blob([str]).size;
```
```js
byteSize('😀'); // 4
byteSize('Hello World'); // 11
```
<br>[⬆ back to top](#table-of-contents)
## Credits ## Credits

File diff suppressed because one or more lines are too long

View File

@ -9,6 +9,6 @@ const byteSize = str => new Blob([str]).size;
``` ```
```js ```js
byteSize("😀"); // 4 byteSize('😀'); // 4
byteSize("Hello World"); // 11 byteSize('Hello World'); // 11
``` ```

View File

@ -2,6 +2,7 @@ anagrams:string
arrayToHtmlList:browser arrayToHtmlList:browser
average:math average:math
bottomVisible:browser bottomVisible:browser
byteSize:uncategorized
call:adapter call:adapter
capitalize:string capitalize:string
capitalizeEveryWord:string capitalizeEveryWord:string