Browse Source

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]
master
Michael Mayer 11 years ago
parent
commit
1966fa20bf
  1. 7
      lib/b64.js
  2. 5
      test/convert.js

7
lib/b64.js

@ -7,7 +7,6 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
? Uint8Array ? Uint8Array
: Array : Array
var ZERO = '0'.charCodeAt(0)
var PLUS = '+'.charCodeAt(0) var PLUS = '+'.charCodeAt(0)
var SLASH = '/'.charCodeAt(0) var SLASH = '/'.charCodeAt(0)
var NUMBER = '0'.charCodeAt(0) var NUMBER = '0'.charCodeAt(0)
@ -116,6 +115,6 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
return output return output
} }
module.exports.toByteArray = b64ToByteArray exports.toByteArray = b64ToByteArray
module.exports.fromByteArray = uint8ToBase64 exports.fromByteArray = uint8ToBase64
}()) }(typeof exports === 'undefined' ? (this.base64js = {}) : exports))

5
test/convert.js

@ -10,8 +10,7 @@ var test = require('tape'),
'sup', 'sup',
'sup?', 'sup?',
'sup?!' 'sup?!'
], ];
res;
test('convert to base64 and back', function (t) { test('convert to base64 and back', function (t) {
t.plan(checks.length); t.plan(checks.length);
@ -49,4 +48,4 @@ function map (arr, callback) {
} }
} }
return res; return res;
} }

Loading…
Cancel
Save