Skip to content

Instantly share code, notes, and snippets.

@BirkhoffLee
Created January 13, 2019 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BirkhoffLee/461d00c878d0228cfca7e7357d8238e2 to your computer and use it in GitHub Desktop.
Save BirkhoffLee/461d00c878d0228cfca7e7357d8238e2 to your computer and use it in GitHub Desktop.
base64 in nodejs
const encode = s => Buffer.from(s).toString('base64')
const decode = s => Buffer.from(s, 'base64').toString()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment