2.1.6 • Published 11 months ago

@keeex/bubble_babble v2.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

@keeex/bubble_babble

Bubble Babble encoding.

Initially forked from tylorr/bubble_babble to avoid the dependency on Buffer, thus making this library work in more JavaScript environments.

Installation

Installation is done from npmjs:

npm install @keeex/bubble_babble

Usage

import {encode, decode} from "@keeex/bubble_babble/lib/bubble_babble.js";

const encoded = encode("Pineapple");
console.log(encoded); // "xigak-nyryk-humil-bosek-sonax"

const ab = decode("xesef-disof-gytuf-katof-movif-baxux");
const ascii = new TextDecoder().decode(ab);
console.log(ascii); // "1234567890"

encode() accepts input as UTF8 string, ArrayBuffer or Uint8Array. decode() returns an ArrayBuffer.

There is a secondary export @keeex/bubblebabble/web/bubble_babble.js that can be used in browser environment. It should be possible to directly import @keeex/bubble_babble but this depend on your environment/bundler.

2.1.6

11 months ago

2.1.5

11 months ago

2.1.4

11 months ago

2.0.0

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago