package
return the number of bytes in a unicode string
npm install utf8-lengthGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
return the number of bytes in a unicode string
var bytes = require('utf8-length');
console.log(bytes('¡dooq dǝǝq'));result:
$ node example/beep.js
13var bytes = require('utf8-length')Return the number of bytes needed to store string.
With npm do:
npm install utf8-bytesMIT