Update byteSize.md

This commit is contained in:
Rohit Tanwar
2017-12-29 18:22:30 +05:30
committed by GitHub
parent 5b747b20d5
commit dbda00da8a

View File

@ -2,6 +2,8 @@
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
const byteSize = str => new Blob([str]).size;
```