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 committed Oct 11, 2018
1 parent a581e42 commit 47a6fdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
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 47a6fdf

Please sign in to comment.