3 ms·
FYI, many browsers offer (native) 'atob()' and 'btoa()' functions for Base64 encode/decode that will outperform that JS code.
by gojomo 16y ago
FYI, 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.