Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function showProperty(property) {
// If this method is called from the UI 'property' is an event and the
// source's text-value is the name of the property
if (_.isObject(property)) {
property = property.source.text;
}
// Get the value and make it a string if it isn't
var valStr = JSON.stringify(Ti.WatchSession[property]);
// Log without showing the notification window
log.argsSilent('Ti.WatchSession.' + property, valStr);
// Fade out the Label
$[property].animate({
opacity: 0
}, function () {
// Update the Label's text with the property value
$[property].text = valStr;
// Fade the Label in
$[property].animate({
opacity: 1
});
});
}