return the number of bytes in a unicode string
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
test
.travis.yml
LICENSE
index.js
package.json
readme.markdown

readme.markdown

utf8-length

return the number of bytes in a unicode string

build status

browser support

example

var bytes = require('utf8-length');
console.log(bytes('¡dooq dǝǝq'));

result:

$ node example/beep.js
13

methods

var bytes = require('utf8-length')

bytes(string)

Return the number of bytes needed to store string.

install

With npm do:

npm install utf8-bytes

license

MIT