Socket
Socket
Sign inDemoInstall

utf8-bytes

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utf8-bytes

return an array of bytes from a unicode string


Version published
Weekly downloads
46K
decreased by-13.19%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 30 Nov 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc