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

Prefer const over let #58

Merged
merged 1 commit into from
Oct 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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