function transformActivity(activity) {
  const activityStats = getStatsFromRawActivity(activity);
  const activityData = formatActivity(activity);
  return {
    ...activityData,
    ...activityStats,
  };
}
/**
 * Transform raw Strava API response for activity
 * into Activity data model
 *
 * @param {Object} activity Strava API response for activity
 */
Transform raw Strava API response for activity
into Activity data model

@param {Object} activity Strava API response for activity
Transform raw Strava API response for activity into Activity data model @param { Object } activity Strava API response for activity
function transformActivity(activity) {
  const activityStats = getStatsFromRawActivity(activity);
  const activityData = formatActivity(activity);
  return {
    ...activityData,
    ...activityStats,
  };
}
function transformActivity ( activity ) { const activityStats = getStatsFromRawActivity ( activity ) ; const activityData = formatActivity ( activity ) ; return { ... activityData , ... activityStats , } ; }
Transform raw Strava API response for activity
 into Activity data model
Transform raw Strava API response for activity into Activity data model