-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Description
All major browsers expose the btoa
and atob
globals for encoding ASCII strings as base64 and vice versa. It'd be beneficial for the "isomorphic" javascript topic if we'd provide these too:
- https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/btoa
- https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/atob
As for the implementation, we can't Buffer('string').toString('base64')
because that would encode unicode while atob
and btoa
must per spec throw on charcodes > 255. https://github.com/mathiasbynens/base64 looks like a solid implemenation we could pretty much drop in.
eek, turbobuilt, jungor, thibautRe, busticated and 47 moreaddaleax
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.