You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 line
264B

  1. function decodeBase64 (base64) {
  2. return Buffer.from(base64, 'base64').toString('utf8')
  3. }
  4. function encodeBase64 (string) {
  5. return Buffer.from(string, 'utf8').toString('base64')
  6. }
  7. module.exports = {
  8. decodeBase64: decodeBase64,
  9. encodeBase64: encodeBase64
  10. }