Browse Source

Fix lint errors

pull/2/head
Luke Childs 6 years ago
parent
commit
4e7bf44e6a
  1. 6
      src/index.js

6
src/index.js

@ -17,12 +17,12 @@ const binaryToBytes = binaryString => Buffer.from(
.map(binary => parseInt(binary, 2)) .map(binary => parseInt(binary, 2))
); );
const randomNumberBetween = (min, max) => Math.floor(parseInt(randomBytes(1).toString('hex'), 16) / 256 * (max - min + 1) + min); const randomNumberBetween = (min, max) => Math.floor((parseInt(randomBytes(1).toString('hex'), 16) / 256 * (max - min + 1)) + min);
const dogeSeed = (bits) => { const dogeSeed = bits => {
bits = bits || 128; bits = bits || 128;
if (bits <= 0 || bits % 8 !== 0) { if (bits <= 0 || bits % 8 !== 0) {
throw TypeError('bits must be divisible by 8'); throw new TypeError('bits must be divisible by 8');
} }
const entropy = randomBytes(bits / 8); const entropy = randomBytes(bits / 8);

Loading…
Cancel
Save