Permalink
Browse files

simplify output

  • Loading branch information...
nolanlawson committed Jan 9, 2017
1 parent 970b880 commit c3af4f8af5051abeacb1f352b8097213fc2ac1a5
Showing with 4 additions and 8 deletions.
  1. +4 −8 src/index.js
View
@@ -1,11 +1,7 @@
var base64Encode;
if (process.browser) {
base64Encode = function (string) {
export default function base64Encode(string) {
if (process.browser) {
return btoa(string);
};
} else {
base64Encode = function (string) {
} else {
return Buffer.from(string, 'binary').toString('base64');
};
}
}
export default base64Encode;

0 comments on commit c3af4f8

Please sign in to comment.