Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tjs.vehicle(options, function (err, vehicle) {
console.log('run login ' + new Date())
if (err) {
console.log(err)
reject(err)
return
}
resolve({
authToken: authToken,
vehicleID: vehicle.id_s,
model: tjs.getModel(vehicle),
state: vehicle.state
})
});
})},
str += " vehicle. ";
}
for (var i = 0; i < vehicles.length; i++) {
if (i === 0) {
str += "A ";
} else {
str += " and a ";
}
var paintColor = tjs.getPaintColor(vehicles[i]);
if (paintColor) {
str += paintColor + " ";
}
str += tjs.getModel(vehicles[i]);
if (vehicles[i].display_name) {
str += " called " + vehicles[i].display_name;
}
}
log(str);
res.say(str).send();
},
function(err) {