From 1966fa20bfcf31d696000148e67bebea5652e9ce Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Wed, 26 Mar 2014 14:07:02 +0100 Subject: [PATCH] Fixes (UglifyJs) lint warnings Fix: Symbol exports is declared but not referenced [lib/b64.js:3,12] Fix: Symbol ZERO is declared but not referenced [lib/b64.js:10,5] Fix: Symbol res is declared but not referenced [test/convert.js:14,1] --- lib/b64.js | 7 +++---- test/convert.js | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/b64.js b/lib/b64.js index 887f706..70f12c9 100644 --- a/lib/b64.js +++ b/lib/b64.js @@ -7,7 +7,6 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; ? Uint8Array : Array - var ZERO = '0'.charCodeAt(0) var PLUS = '+'.charCodeAt(0) var SLASH = '/'.charCodeAt(0) var NUMBER = '0'.charCodeAt(0) @@ -116,6 +115,6 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; return output } - module.exports.toByteArray = b64ToByteArray - module.exports.fromByteArray = uint8ToBase64 -}()) + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) diff --git a/test/convert.js b/test/convert.js index 48fbba7..60b09c0 100644 --- a/test/convert.js +++ b/test/convert.js @@ -10,8 +10,7 @@ var test = require('tape'), 'sup', 'sup?', 'sup?!' - ], - res; + ]; test('convert to base64 and back', function (t) { t.plan(checks.length); @@ -49,4 +48,4 @@ function map (arr, callback) { } } return res; -} \ No newline at end of file +}