Skip to content

Commit 84bf79b

Browse files
JustinBeckwithalexander-fenster
authored andcommitted
Enable prefer-const in the eslint config (#102)
1 parent 3dc2423 commit 84bf79b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

video-intelligence/analyze.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function analyzeLabelsGCS(gcsUri) {
4949
labels.forEach(label => {
5050
console.log(`Label ${label.entity.description} occurs at:`);
5151
label.segments.forEach(segment => {
52-
let time = segment.segment;
52+
const time = segment.segment;
5353
if (time.startTimeOffset.seconds === undefined) {
5454
time.startTimeOffset.seconds = 0;
5555
}
@@ -120,7 +120,7 @@ function analyzeLabelsLocal(path) {
120120
labels.forEach(label => {
121121
console.log(`Label ${label.entity.description} occurs at:`);
122122
label.segments.forEach(segment => {
123-
let time = segment.segment;
123+
const time = segment.segment;
124124
if (time.startTimeOffset.seconds === undefined) {
125125
time.startTimeOffset.seconds = 0;
126126
}
@@ -329,9 +329,10 @@ function analyzeVideoTranscription(gcsUri) {
329329
const alternative =
330330
results[0].annotationResults[0].speechTranscriptions[0].alternatives[0];
331331
alternative.words.forEach(wordInfo => {
332-
let start_time =
332+
const start_time =
333333
wordInfo.startTime.seconds + wordInfo.startTime.nanos * 1e-9;
334-
let end_time = wordInfo.endTime.seconds + wordInfo.endTime.nanos * 1e-9;
334+
const end_time =
335+
wordInfo.endTime.seconds + wordInfo.endTime.nanos * 1e-9;
335336
console.log(
336337
'\t' + start_time + 's - ' + end_time + 's: ' + wordInfo.word
337338
);

0 commit comments

Comments
 (0)