Convert ordinary strings to binary text
usage
const strto2 = require('./index.js');
let str = 'hello world,this is a test';
async function T1(str){
let to2text = await strto2.to2(str);
console.log(to2text);
};
T1(str);
let str2 = '1101000 1100101 1101100 1101100 1101111 100000 1110111 1101111 1110010 1101100 1100100 101100 1110100 1101000 1101001 1110011 100000 1101001 1110011 100000 1100001 100000 1110100 1100101 1110011 1110100';
async function T2(str){
let toRtext = await strto2.toR(str);
console.log(toRtext);
}
T2(str2);