In the previous discussion someone lamented they wished they could do this in JavaScript[0].
Nowadays we have TextDecoder and BigInt64Array so I'm pretty sure we actually could do it[1][2].
I doubt it would be faster than calling <number>.toString(2), but in principle we could port this.
[0] https://news.ycombinator.com/item?id=10517332
[1] https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...