Get the real byte length of a string.
npm install byte-lengthCalculate the real byte length of any string.
Buffer.byteLength, however including the entire buffer shim in the browser just for getting the byte length of a string is not very conservative.``console`
npm install byte-length
`javascript
import { byteLength } from "byte-length";
byteLength("hello"); //-> 5
byteLength("😀"); //-> 4
byteLength("fullwidth characters"); //-> 60
`
* Use npm test` to run tests.
Please feel free to create a PR!