Skip to content

Commit

Permalink
Fix IE8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
feross committed Feb 13, 2016
1 parent 29ed40f commit 036ce50
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/b64.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
;(function (exports) {
'use strict'

var i
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
var lookup = Array.prototype.map.call(code, function (c) { return c })
var lookup = []
for (i = 0; i < code.length; i++) {
lookup[i] = code[i]
}
var revLookup = []

for (var i = 0; i < code.length; ++i) {
for (i = 0; i < code.length; ++i) {
revLookup[code.charCodeAt(i)] = i
}
revLookup['-'.charCodeAt(0)] = 62
Expand Down

0 comments on commit 036ce50

Please sign in to comment.