# utf8-bytes

> return an array of bytes from a unicode string

Latest version **0.0.1** (published 2013-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install utf8-bytes
pnpm add utf8-bytes
yarn add utf8-bytes
bun add utf8-bytes
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2013-11-30 |
| First published | 2013-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Halliday |
| Maintainers | substack |
| Keywords | utf8, utf-8, unicode, bytes, string, encoding |

## Links

- npm: https://www.npmjs.com/package/utf8-bytes
- Repository: https://github.com/substack/utf8-bytes
- Issues: https://github.com/substack/utf8-bytes/issues
- npm.io page: https://npm.io/package/utf8-bytes

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2013-11-30
- 0.0.0 — 2013-11-29

## README

# utf8-bytes

return an array of all the bytes in a unicode string

[![build status](https://secure.travis-ci.org/substack/utf8-bytes.png)](http://travis-ci.org/substack/utf8-bytes)

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

# example

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

output:

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

# methods

``` js
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](https://npmjs.org) do:

```
npm install utf8-bytes
```

# license

MIT

---
_Source: https://npm.io/package/utf8-bytes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
