JSPM

utf8-bytes

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 51630
  • Score
    100M100P100Q157144F
  • License MIT

return an array of bytes from a unicode string

Package Exports

  • utf8-bytes

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (utf8-bytes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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