Skip to content

return an array of bytes from a unicode string

License

Notifications You must be signed in to change notification settings

pkrumins/utf8-bytes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

utf8-bytes

return an array of all the bytes in a unicode string

build status

browser support

This module is like Buffer(str).toJSON(), but without using Buffer.

example

var bytes = require('utf8-bytes');
console.log(bytes('[☉,☼]'));

output:

$ node example/utf8-bytes.js
[ 91, 226, 152, 137, 44, 226, 152, 188, 93 ]

methods

var bytes = require('utf8-bytes')

bytes(str)

Return an array of integers from 0 through 255, inclusive, representing the bytes in the unicode string str.

install

With npm do:

npm install utf8-bytes

license

MIT

About

return an array of bytes from a unicode string

Resources

License

Stars

Watchers

Forks

Packages

No packages published