utf8-binary

0.2.0 • Public • Published

utf8-binary

A fast UTF-8 encoding and decoding.

npm GitHub license Build Status Coverage Status

Future works (not implemented yet)

  • Web browsers

Installation

# npm 
npm install utf8-binary
 
# yarn 
yarn add utf8-binary

Usage

const { utf8toBin, binToUtf8 } = require('utf8-binary');
 
const bin = utf8toBin('\u0080'); // '\xc2\x80'
 
const buf = Buffer.from(bin, 'binary');
binToUtf8(buf, 0, buf.length); // '\u0080'

Tests

Run tests as follows:

npm run test

License

Copyright © 2018-present Alex Masterov <alex.masterow@gmail.com>

utf8-binary is licensed under MIT and can be used for any personal or commercial project.

Package Sidebar

Install

npm i utf8-binary

Weekly Downloads

9

Version

0.2.0

License

MIT

Unpacked Size

29.3 kB

Total Files

7

Last publish

Collaborators

  • asm