base64 encode/decode in v8

928 views
Skip to first unread message

Gautham B A

unread,
Aug 20, 2018, 2:26:18 PM8/20/18
to v8-users
Hello folks,

I was wondering if there's any v8 API that allows one to do base64 encoding/decoding. Browsers have window.btoa, but it's not part of the global object in v8.

Thanks,
--Gautham

Mathias Bynens

unread,
Aug 20, 2018, 2:29:56 PM8/20/18
to v8-users
`btoa` (and `atob`) are indeed browser-specific APIs; they’re not part of ECMAScript and not implemented in V8.

You could use a JavaScript implementation. https://github.com/mathiasbynens/base64 matches the browser APIs `btoa` and `atob` as closely as possible.

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages