Skip to content

Commit

Permalink
Enable prefer-const in the eslint config (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored and alexander-fenster committed Sep 20, 2018
1 parent 3dc2423 commit 84bf79b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions video-intelligence/analyze.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function analyzeLabelsGCS(gcsUri) {
labels.forEach(label => {
console.log(`Label ${label.entity.description} occurs at:`);
label.segments.forEach(segment => {
let time = segment.segment;
const time = segment.segment;
if (time.startTimeOffset.seconds === undefined) {
time.startTimeOffset.seconds = 0;
}
Expand Down Expand Up @@ -120,7 +120,7 @@ function analyzeLabelsLocal(path) {
labels.forEach(label => {
console.log(`Label ${label.entity.description} occurs at:`);
label.segments.forEach(segment => {
let time = segment.segment;
const time = segment.segment;
if (time.startTimeOffset.seconds === undefined) {
time.startTimeOffset.seconds = 0;
}
Expand Down Expand Up @@ -329,9 +329,10 @@ function analyzeVideoTranscription(gcsUri) {
const alternative =
results[0].annotationResults[0].speechTranscriptions[0].alternatives[0];
alternative.words.forEach(wordInfo => {
let start_time =
const start_time =
wordInfo.startTime.seconds + wordInfo.startTime.nanos * 1e-9;
let end_time = wordInfo.endTime.seconds + wordInfo.endTime.nanos * 1e-9;
const end_time =
wordInfo.endTime.seconds + wordInfo.endTime.nanos * 1e-9;
console.log(
'\t' + start_time + 's - ' + end_time + 's: ' + wordInfo.word
);
Expand Down

0 comments on commit 84bf79b

Please sign in to comment.