Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

HuskyLabs/Unicode-Braille-Translator

Repository files navigation

forthebadge forthebadge Codacy Badge

Install

npm install unicode-braille-translator

Unicode Braille Translator

An easy, and simple npm package to use that converts text to braille and back. Robust and reliable with an ever increasing accuracy. Please note that this is api is still being developed and only supports Unified English Braille (UEB).

Docs

Example

const UBT = require("unicode-braille-translator");

const translator = new UBT.default();
const testString =
  'ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz `1234567890-= ~!@#$%^&*()_+ ,./ <>? /*-+. ;: \'" []{} \\|';

test(testString);
async function test(text) {
  // Convert noraml chars to braille chars
  const braille = await translator.toBraille(text);

  // Convert braille chars to normal chars
  const toNormal = await translator.toNormal(braille);

  console.log(text);
  console.log(braille);
  console.log(toNormal);
}