function isDuplicateEffort(newEffort, prevEfforts) {
  for (let idx = 0; idx < prevEfforts.length; idx += 1) {
    const prevEffort = prevEfforts[idx];
    // Is duplicate if start time and segment id match
    if (newEffort.start_date === prevEffort.start_date
      && newEffort.segment.id === prevEffort.segment.id
    ) {
      return true;
    }
  }
  return false;
}
/**
 * Checks if segment effort duplicates any existing effort in array
 *
 * @param {Object} newEffort
 * @param {Array} prevEfforts
 * @returns {Boolean}
 */
Checks if segment effort duplicates any existing effort in array
@param {Object} newEffort
@param {Array} prevEfforts
@returns {Boolean}
Checks if segment effort duplicates any existing effort in array @param { Object } newEffort @param { Array } prevEfforts @returns { Boolean }
function isDuplicateEffort(newEffort, prevEfforts) {
  for (let idx = 0; idx < prevEfforts.length; idx += 1) {
    const prevEffort = prevEfforts[idx];
    if (newEffort.start_date === prevEffort.start_date
      && newEffort.segment.id === prevEffort.segment.id
    ) {
      return true;
    }
  }
  return false;
}
function isDuplicateEffort ( newEffort , prevEfforts ) { for ( let idx = 0 ; idx < prevEfforts . length ; idx += 1 ) { const prevEffort = prevEfforts [ idx ] ; if ( newEffort . start_date === prevEffort . start_date && newEffort . segment . id === prevEffort . segment . id ) { return true ; } } return false ; }
Checks if segment effort duplicates any existing effort in array
 @param {Object} newEffort
 @param {Array} prevEfforts
 @returns {Boolean}
Checks if segment effort duplicates any existing effort in array @param { Object } newEffort @param { Array } prevEfforts @returns { Boolean }
// Is duplicate if start time and segment id match