Update byteSize.md
This commit is contained in:
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
Returns the length of string.
|
Returns the length of string.
|
||||||
|
|
||||||
|
It converts a given string to a [Blob Object](https://developer.mozilla.org/en-US/docs/Web/API/Blob) and finds it's size
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const byteSize = str => new Blob([str]).size;
|
const byteSize = str => new Blob([str]).size;
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user