MediaWiki talk:ChatBinaryButton.js

Alternative binary solution
 // Better to binary algorithm // By: らり牛ちゃん const s2b = (n) => n.split('').map(x => {   // splits the string into an array and feeds it to a mapper    let n = x.charCodeAt(0).toString(2);     // Grabs the character code and converts it to binary    return n.length === 8 ? n : '0' + n;     // Adds zero-padding if necessary }).join(' ');                                // Convert our mapped array to a string

s2b('Hello there!'); //#=> 01001000 01100101 01101100 01101100 01101111 0100000 01110100 01101000 01100101 01110010 01100101 0100001

जसले मह काढ्छ उसले हात चाट्छ 16:21, November 6, 2016 (UTC)