Skip to content

Commit

Permalink
fix: remove arrow syntax for IE11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
duckyb authored and Trott committed Jan 25, 2020
1 parent 9739b7f commit 2bdcc91
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions slug.js
Expand Up @@ -11,10 +11,14 @@ function symbols(code) {

var base64;
if (typeof window === 'undefined') {
base64 = (input) => Buffer.from(input).toString('base64');
base64 = function(input) {
return Buffer.from(input).toString('base64');
}
} else {
// eslint-disable-next-line no-undef
base64 = (input) => btoa(unescape(encodeURIComponent(input)))
base64 = function(input) {
// eslint-disable-next-line no-undef
return btoa(unescape(encodeURIComponent(input)))
}
}

function slug(string, opts) {
Expand Down

0 comments on commit 2bdcc91

Please sign in to comment.