Travis build: 1898

This commit is contained in:
30secondsofcode
2020-04-16 20:21:43 +00:00
parent 9a493bbbb7
commit 44df63e008
12 changed files with 124 additions and 79 deletions

View File

@ -12,14 +12,15 @@ Use `size` of a [`Blob` object](https://developer.mozilla.org/en-US/docs/Web/API
Split strings into array of characters with `split('')` and return its length.
```js
const size = val =>
Array.isArray(val)
? val.length
: val && typeof val === 'object'
? val.size || val.length || Object.keys(val).length
: typeof val === 'string'
? new Blob([val]).size
: 0;
? val.size || val.length || Object.keys(val).length
: typeof val === 'string'
? new Blob([val]).size
: 0;
```
```js