aboutsummaryrefslogtreecommitdiff
path: root/node_modules/base64-js/index.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/base64-js/index.js
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
node_modules
Diffstat (limited to 'node_modules/base64-js/index.js')
-rw-r--r--node_modules/base64-js/index.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/node_modules/base64-js/index.js b/node_modules/base64-js/index.js
index 8e806ac47..9d0087433 100644
--- a/node_modules/base64-js/index.js
+++ b/node_modules/base64-js/index.js
@@ -33,22 +33,22 @@ function placeHoldersCount (b64) {
function byteLength (b64) {
// base64 is 4/3 + up to two characters of the original data
- return b64.length * 3 / 4 - placeHoldersCount(b64)
+ return (b64.length * 3 / 4) - placeHoldersCount(b64)
}
function toByteArray (b64) {
- var i, j, l, tmp, placeHolders, arr
+ var i, l, tmp, placeHolders, arr
var len = b64.length
placeHolders = placeHoldersCount(b64)
- arr = new Arr(len * 3 / 4 - placeHolders)
+ arr = new Arr((len * 3 / 4) - placeHolders)
// if there are placeholders, only get up to the last complete 4 chars
l = placeHolders > 0 ? len - 4 : len
var L = 0
- for (i = 0, j = 0; i < l; i += 4, j += 3) {
+ for (i = 0; i < l; i += 4) {
tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
arr[L++] = (tmp >> 16) & 0xFF
arr[L++] = (tmp >> 8) & 0xFF