Skip to content

Instantly share code, notes, and snippets.

@hcz
Created March 5, 2019 12:02
Show Gist options
  • Select an option

  • Save hcz/d1f885cb41c3ecdb65ff38307c5f72ea to your computer and use it in GitHub Desktop.

Select an option

Save hcz/d1f885cb41c3ecdb65ff38307c5f72ea to your computer and use it in GitHub Desktop.
Node.js ponyfill for atob and btoa
const atob = a => new Buffer(a, 'base64').toString('binary');
const btoa = b => new Buffer(b).toString('base64');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment