Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Commit

Permalink
style: prefer const over let
Browse files Browse the repository at this point in the history
Prefer const over let when the binding is static, in order to comply with an upcoming Standard rule.
  • Loading branch information
LinusU authored and daviddias committed Oct 27, 2018
1 parent a581e42 commit 443a8eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Expand Up @@ -83,13 +83,13 @@ exports.decode = function decode (buf) {
throw new Error('multihash too short. must be > 3 bytes.')
}

let code = varint.decode(buf)
const code = varint.decode(buf)
if (!exports.isValidCode(code)) {
throw new Error(`multihash unknown function code: 0x${code.toString(16)}`)
}
buf = buf.slice(varint.decode.bytes)

let len = varint.decode(buf)
const len = varint.decode(buf)
if (len < 1) {
throw new Error(`multihash invalid length: 0x${len.toString(16)}`)
}
Expand Down

0 comments on commit 443a8eb

Please sign in to comment.