Prefer const over let

This commit is contained in:
Linus Unnebäck
2018-10-10 21:21:29 +02:00
parent fa7d917d0d
commit ffb809bbca
8 changed files with 11 additions and 11 deletions

View File

@@ -236,7 +236,7 @@ function saveImmediate (state, cb) {
.filter((x) => x.infoHash)
.map(function (x) {
const torrent = {}
for (let key in x) {
for (const key in x) {
if (key === 'progress' || key === 'torrentKey') {
continue // Don't save progress info or key for the webtorrent process
}

View File

@@ -98,7 +98,7 @@ function getSystemInfo () {
function getTorrentStats (state) {
const count = state.saved.torrents.length
let sizeMB = 0
let byStatus = {
const byStatus = {
new: { count: 0, sizeMB: 0 },
downloading: { count: 0, sizeMB: 0 },
seeding: { count: 0, sizeMB: 0 },

View File

@@ -98,7 +98,7 @@ function scoreAudioCoverFile (imgFile) {
spectrogram: -80
}
for (let keyword in relevanceScore) {
for (const keyword in relevanceScore) {
if (fileName === keyword) {
return relevanceScore[keyword]
}