Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

str-to-2

nicknameid6ISC1.0.0

Convert ordinary strings to binary text

Text conversion, Binary text, ordinary text

readme

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 */