Update byteSize.md
This commit is contained in:
@ -3,9 +3,7 @@
|
|||||||
Returns the length of string.
|
Returns the length of string.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const byteSize = (str) => {
|
const byteSize = str => new Blob([str]).size;
|
||||||
return new Blob([str]).size;
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|||||||
Reference in New Issue
Block a user