We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 350325d commit 499ac41Copy full SHA for 499ac41
lib/to-array-buffer.js
@@ -2,10 +2,8 @@
2
3
module.exports = function (base64Data) {
4
var isBrowser = typeof window !== 'undefined' && typeof window.atob === 'function'
5
- var binary = isBrowser ?
6
- window.atob(base64Data) :
7
- new Buffer(base64Data, 'base64').toString('binary')
8
- var bytes = new Uint8Array(binary.length)
+ var binary = isBrowser ? window.atob(base64Data) : new Buffer(base64Data, 'base64').toString('binary')
+ var bytes = new Uint8Array(binary.length)
9
10
for (var i = 0; i < binary.length; ++i) {
11
bytes[i] = binary.charCodeAt(i)
0 commit comments