3 ms·
I'd recommend sending base64'd data down. Use this to encode/decode from javascript strings of 1-byte-per-character data: https://github.com/mcarter/js.io/blob
by jacobolus 16y ago
I'd recommend sending base64'd data down. Use this to encode/decode from javascript strings of 1-byte-per-character data:
https://github.com/mcarter/js.io/blob/master/packages/std/base64.js https://github.com/mcarter/js.io/blob/master/packages/std/ba...
- gojomo 16y agoFYI, many browsers offer (native) 'atob()' and 'btoa()' functions for Base64 encode/decode that will outperform that JS code.
- deleted 16y ago[deleted]
- tjarratt 16y agoFor what it's worth, the linked code on github appears to be specific to node.js. Last I checked, there was no native function to convert strings to and from base64, only buffers. If you're writing this for client side, it would indeed be preferable to use the native functions.