npm install 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).
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);
}