From ab3e91af2e802a7768b73daafa89a43a3dd28d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Wed, 10 Oct 2018 21:05:17 +0200 Subject: [PATCH] Prefer const over let --- src/resolver.js | 2 +- src/util.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resolver.js b/src/resolver.js index ee6caac..fd978e5 100644 --- a/src/resolver.js +++ b/src/resolver.js @@ -47,7 +47,7 @@ exports.resolve = (binaryBlob, path, callback) => { // out of scope let value - let len = parts.length + const len = parts.length for (let i = 0; i < len; i++) { const partialPath = parts.shift() diff --git a/src/util.js b/src/util.js index 38c43a2..195eefc 100644 --- a/src/util.js +++ b/src/util.js @@ -70,7 +70,7 @@ function replaceCIDbyTAG (dagNode) { return tagCID(obj['/']) } else if (keys.length > 0) { // Recursive transform - let out = {} + const out = {} keys.forEach((key) => { if (typeof obj[key] === 'object') { out[key] = transform(obj[key])