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

Commit 443a8eb

Browse files
LinusUdaviddias
authored andcommitted
style: prefer const over let
Prefer const over let when the binding is static, in order to comply with an upcoming Standard rule.
1 parent a581e42 commit 443a8eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ exports.decode = function decode (buf) {
8383
throw new Error('multihash too short. must be > 3 bytes.')
8484
}
8585

86-
let code = varint.decode(buf)
86+
const code = varint.decode(buf)
8787
if (!exports.isValidCode(code)) {
8888
throw new Error(`multihash unknown function code: 0x${code.toString(16)}`)
8989
}
9090
buf = buf.slice(varint.decode.bytes)
9191

92-
let len = varint.decode(buf)
92+
const len = varint.decode(buf)
9393
if (len < 1) {
9494
throw new Error(`multihash invalid length: 0x${len.toString(16)}`)
9595
}

0 commit comments

Comments
 (0)