remove unused variables

This commit is contained in:
ansuz
2017-05-04 16:16:09 +02:00
parent 5739c3d973
commit 78b11584f8
53 changed files with 420 additions and 734 deletions

View File

@@ -1,7 +1,7 @@
define([], function () {
var exports = {};
var hexToUint8Array = exports.hexToUint8Array = function (s) {
exports.hexToUint8Array = function (s) {
// if not hex or odd number of characters
if (!/[a-fA-F0-9]+/.test(s) || s.length % 2) { throw new Error("string is not hex"); }
return s.split(/([0-9a-fA-F]{2})/)
@@ -9,7 +9,7 @@ define([], function () {
.map(function (x) { return Number('0x' + x); });
};
var uint8ArrayToHex = exports.uint8ArrayToHex = function (a) {
exports.uint8ArrayToHex = function (a) {
return a.reduce(function(memo, i) {
return memo + ((i < 16) ? '0' : '') + i.toString(16);
}, '');