@keeex/bubble_babble
TypeScript icon, indicating that this package has built-in type declarations

2.1.6 • Public • Published

@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.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @keeex/bubble_babble

      Homepage

      keeex.me/oss

      Weekly Downloads

      0

      Version

      2.1.6

      License

      MIT

      Unpacked Size

      18 kB

      Total Files

      11

      Last publish

      Collaborators

      • keeex_jenkins
      • marc-keeex
      • cley_faye