1.0.0 • Published 8 years ago
str-to-2 v1.0.0
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);
/*
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
*/
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); /* hello world,this is a test */
1.0.0
8 years ago