commit ced0da506d7f4f23d04c53ffab6243ca97a1a688
parent 182b1da2b416294e25886faf569eedee848b2a12
Author: Jared Tobin <jared@jtobin.io>
Date: Wed, 7 Aug 2019 06:53:21 -0230
Resolve eslint complaints.
Diffstat:
2 files changed, 3 insertions(+), 32 deletions(-)
diff --git a/src/internal/co.js b/src/internal/co.js
@@ -66,9 +66,6 @@ const suffixes = suf.match(/.{1,3}/g)
const bex = (n) =>
two.pow(n)
-const lsh = (a, b, c) =>
- bex(bex(a).mul(b)).mul(c)
-
const rsh = (a, b, c) =>
c.div(bex(bex(a).mul(b)))
@@ -90,15 +87,6 @@ const hex2patp = (hex) =>
patp(new BN(hex, 'hex'))
/**
- * Convert a Buffer to a @p-encoded string.
- *
- * @param {Buffer} buf
- * @return {String}
- */
-const buf2patp = (buf) =>
- hex2patp(buf.toString('hex'))
-
-/**
* Convert a @p-encoded string to a hex-encoded string.
*
* @param {String} name @p
@@ -127,15 +115,6 @@ const patp2hex = (name) => {
}
/**
- * Convert a @p-encoded string to a Buffer.
- *
- * @param {String} name
- * @return {Buffer}
- */
-const patp2buf = name =>
- Buffer.from(patp2hex(name), 'hex')
-
-/**
* Convert a @p-encoded string to a bignum.
*
* @param {String} name @p
@@ -260,17 +239,6 @@ const patq2bn = name =>
new BN(patq2hex(name), 'hex')
/**
- * Convert a @q-encoded string to a Buffer.
- *
- * @param {String} name @q
- * @return {Buffer}
- */
-const patq2buf = name => {
- const hex = patq2hex(name)
- return Buffer.from(hex, 'hex')
-}
-
-/**
* Convert a @q-encoded string to a decimal-encoded string.
*
* @param {String} name @q
diff --git a/src/internal/muk.js b/src/internal/muk.js
@@ -58,6 +58,7 @@ const muk = (syd, len, key) => {
* @return {number} 32-bit positive integer hash
**/
const murmurhash3_32_gc = (key, seed) => {
+ // eslint-disable-next-line no-unused-vars
let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;
remainder = key.length & 3; // key.length % 4
@@ -89,7 +90,9 @@ const murmurhash3_32_gc = (key, seed) => {
switch (remainder) {
case 3: k1 ^= (key.charCodeAt(i + 2) & 0xff) << 16;
+ // eslint-disable-next-line no-fallthrough
case 2: k1 ^= (key.charCodeAt(i + 1) & 0xff) << 8;
+ // eslint-disable-next-line no-fallthrough
case 1: k1 ^= (key.charCodeAt(i) & 0xff);
k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;