# utf8-bin

> A fast UTF-8 encoding and decoding

Latest version **1.0.3** (published 2019-07-18) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-07-18 |
| First published | 2018-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 106.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alex Masterov |
| Maintainers | asm |
| Keywords | utf8, binary, encoding, decoding, browser |

## Links

- npm: https://www.npmjs.com/package/utf8-bin
- Repository: https://github.com/AlexMasterov/utf8-bin.js
- Homepage: https://github.com/AlexMasterov/utf8-bin.js#readme
- Issues: https://github.com/AlexMasterov/utf8-bin.js/issues
- npm.io page: https://npm.io/package/utf8-bin

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2019-07-18
- 1.0.2 — 2019-06-09
- 1.0.1 — 2019-06-09
- 1.0.0 — 2019-05-29
- 0.4.0 — 2019-04-04
- 0.3.1 — 2018-11-07
- 0.3.0 — 2018-11-06
- 0.2.2 — 2018-11-01
- 0.2.1 — 2018-10-24
- 0.2.0 — 2018-10-24
- 0.1.0 — 2018-10-23

## README

# utf8-bin

A fast UTF-8 encoding and decoding.

[![npm](https://img.shields.io/npm/v/utf8-bin.svg)](https://www.npmjs.com/package/utf8-bin)
[![Build Status](https://travis-ci.org/AlexMasterov/utf8-bin.js.svg)](https://travis-ci.org/AlexMasterov/utf8-bin.js)
[![Coverage Status](https://coveralls.io/repos/github/AlexMasterov/utf8-bin.js/badge.svg?branch=master)](https://coveralls.io/github/AlexMasterov/utf8-bin.js?branch=master)

## Installation
With [npm](https://www.npmjs.com/package/npm):
```sh
npm install utf8-bin
```
With [yarn](https://yarnpkg.com):
```sh
yarn add utf8-bin
```
## Usage
__ES Modules__
```js
import { strToUtf8, utf8ToStr } from 'utf8-bin';        // ES6 (codePoint)
import { strToUtf8, utf8ToStr } from 'utf8-bin/legacy'; // ES5

// Node v8.6  --experimental-modules
// Node v12.0 --experimental-modules --es-module-specifier-resolution=node
import { strToUtf8, utf8ToStr } from 'utf8-bin/index';
```
__CommonJS__
```js
const { strToUtf8, utf8ToStr } = require('utf8-bin');
```

## API
#### `utf8Length(str[, offset, length])`
#### `strToUtf8(str[, offset, length])`
#### `utf8ToStr(buf[, offset, length])`
#### `viewUtf8ToStr(view[, offset, length])`

## License
[MIT](LICENSE)

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