function formatSnapshotList(list, limit) {
  limit = (typeof limit != 'undefined') ? limit : -1;

  const limitedList = limit > 0 ? list.slice(0, limit) : list;
  const hasMore = list.length > limitedList.length;
  const buildList = (snapshots) => snapshots.map((s) => s.join(' > ')).join('\n');

  if (hasMore) {
    return buildList(limitedList.slice(0, -1)) + `\n +${list.length - limitedList.length + 1} more`;
  }

  return buildList(limitedList);
}
function formatSnapshotList(list, limit) {
  limit = (typeof limit != 'undefined') ? limit : -1;

  const limitedList = limit > 0 ? list.slice(0, limit) : list;
  const hasMore = list.length > limitedList.length;
  const buildList = (snapshots) => snapshots.map((s) => s.join(' > ')).join('\n');

  if (hasMore) {
    return buildList(limitedList.slice(0, -1)) + `\n +${list.length - limitedList.length + 1} more`;
  }

  return buildList(limitedList);
}
function formatSnapshotList ( list , limit ) { limit = ( typeof limit != 'undefined' ) ? limit : - 1 ; const limitedList = limit > 0 ? list . slice ( 0 , limit ) : list ; const hasMore = list . length > limitedList . length ; const buildList = ( snapshots ) => snapshots . map ( ( s ) => s . join ( ' > ' ) ) . join ( '\n' ) ; if ( hasMore ) { return buildList ( limitedList . slice ( 0 , - 1 ) ) + ` \n ${ list . length - limitedList . length + 1 } ` ; } return buildList ( limitedList ) ; }
Renders a list of snapshots up to specified limit of lines
@param list {array} list of snapshots
@param limit {number} maximum number of lines rendered under summary
@returns {string}
Renders a list of snapshots up to specified limit of lines