From 2e27163fc36436747481dc94a6dc95fe5455079d Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 6 Mar 2015 18:28:11 -0800 Subject: [PATCH] style preparing base64-js for standard v3, which now requires statements to always use braces, except when they're on a single line. --- lib/b64.js | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/lib/b64.js b/lib/b64.js index ddd5edb..69fcb10 100644 --- a/lib/b64.js +++ b/lib/b64.js @@ -17,20 +17,12 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' function decode (elt) { var code = elt.charCodeAt(0) - if (code === PLUS || - code === PLUS_URL_SAFE) - return 62 // '+' - if (code === SLASH || - code === SLASH_URL_SAFE) - return 63 // '/' - if (code < NUMBER) - return -1 // no match - if (code < NUMBER + 10) - return code - NUMBER + 26 + 26 - if (code < UPPER + 26) - return code - UPPER - if (code < LOWER + 26) - return code - LOWER + 26 + if (code === PLUS || code === PLUS_URL_SAFE) return 62 // '+' + if (code === SLASH || code === SLASH_URL_SAFE) return 63 // '/' + if (code < NUMBER) return -1 // no match + if (code < NUMBER + 10) return code - NUMBER + 26 + 26 + if (code < UPPER + 26) return code - UPPER + if (code < LOWER + 26) return code - LOWER + 26 } function b64ToByteArray (b64) {