index.js
function getActivity(activityId) {
  var activity = activities[activityId];

  if (activity === undefined) {
    throw new Error('activity with id "' + activityId + '" not found.');
  }

  return activity;
}
function getActivity(activityId) {
  var activity = activities[activityId];

  if (activity === undefined) {
    throw new Error('activity with id "' + activityId + '" not found.');
  }

  return activity;
}
function getActivity ( activityId ) { var activity = activities [ activityId ] ; if ( activity === undefined ) { throw new Error ( 'activity with id "' + activityId + '" not found.' ) ; } return activity ; }
The Activity object.
@typedef {{
id: number,
message: string,
timestamps: Array.<number>
}} Activity
 
Get an Activity object if it exists. Throws if it doesn't exist.
@param {number} activityId Activity id.
@return {Activity}
The Activity object .