utf8-bytes
return an array of bytes from a unicode string
Last updated 12 years ago by substack .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install utf8-bytes 
SYNC missed versions from official npm registry.

utf8-bytes

return an array of all the bytes in a unicode string

build status

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

Current Tags

  • 0.0.1                                ...           latest (12 years ago)

2 Versions

  • 0.0.1                                ...           12 years ago
  • 0.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 2
Dependencies (0)
None
Dev Dependencies (1)

Copyright 2013 - present © cnpmjs.org | Home |