1.0.5 • Published 3 years ago
texttobin v1.0.5
texttobin
Module and CLI tool for converting text to binary
Installation: npm i texttobin
Installation for CLI usage: sudo npm i texttobin -g
Example CLI usage:
to-bin Hello World...!
Result: [ '01001000', '01100101', '01101100', '01101100', '01101111', '00100000', '01010111', '01101111', '01110010', '01101100', '01100100', '00101110', '00101110', '00101110', '00100001' ]
Example usages in code:
require("texttobin");
"Hello World...!".toBinary();
/*
Result:
[ '01001000', '01100101', '01101100', '01101100', '01101111', '00100000', '01010111', '01101111', '01110010', '01101100', '01100100', '00101110', '00101110', '00101110', '00100001' ]
*/
const toBinary = require("texttobin");
toBinary("Hello World...!");
/*
Result:
[ '01001000', '01100101', '01101100', '01101100', '01101111', '00100000', '01010111', '01101111', '01110010', '01101100', '01100100', '00101110', '00101110', '00101110', '00100001' ]
*/
const texttobin = require("texttobin");
texttobin.toBinary("Hello World...!");
/*
Result:
[ '01001000', '01100101', '01101100', '01101100', '01101111', '00100000', '01010111', '01101111', '01110010', '01101100', '01100100', '00101110', '00101110', '00101110', '00100001' ]
*/