xtao-org / utf8x2x

Simple functions to convert between streams of UTF-8 bytes and UTF-8 code points.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Utf8x2x

Simple functions to convert between a streams of UTF-8 bytes and UTF-8 code points.

Utf8b2c converts bytes to code points, one byte at a time, taking in one byte at a time, emitting one code point at a time.

Utf8bs2c converts bytes to code points, taking in multiple bytes at a time, emitting one code point at a time.

Utf8c2b converts code points to bytes, taking in one code point at a time, emitting one byte at a time.

Utf8c2bs converts code points to bytes, taking in one code point at a time, emitting multiple bytes at a time.

Installation

Deno and browser

import {Utf8bs2c} from 'https://cdn.jsdelivr.net/gh/xtao-org/utf8x2x@v0.2.3/mod.js'

Node.js

npm install xtao-org/utf8x2x#semver:0.2.3

© 2023 Darius J Chuck

About

Simple functions to convert between streams of UTF-8 bytes and UTF-8 code points.

License:MIT License


Languages

Language:JavaScript 100.0%