src/utils/bot-utils.js
/**
   * Get the max id of the collection, given the name of the id's property
   * @param  {Array<Object>} arrayCollection the collection to check
   * @param  {string}        idColumn        the name of id column (skip to use the default variant)
   * @return {number}                        the max id, 0 if the ids are not found in the collection
   */
Get the max id of the collection, given the name of the id's property
@param  {Array} arrayCollection the collection to check
@param  {string}        idColumn        the name of id column (skip to use the default variant)
@return {number}                        the max id, 0 if the ids are not found in the collection
Get the max id of the collection given the name of the id ' s property @param { Array } arrayCollection the collection to check @param { string } idColumn the name of id column ( skip to use the default variant ) @return { number } the max id 0 if the ids are not found in the collection
static findMaxId(arrayCollection, idColumn) {
    if (idColumn === undefined) {
      idColumn = DefaultIdColumn;
    }
    let maxId = 0;
    for (const element of arrayCollection) {
      if (element[idColumn] > maxId) {
        maxId = element[idColumn];
      }
    }
    return maxId;
  }
static findMaxId ( arrayCollection , idColumn ) { if ( idColumn === undefined ) { idColumn = DefaultIdColumn ; } let maxId = 0 ; for ( const element of arrayCollection ) { if ( element [ idColumn ] > maxId ) { maxId = element [ idColumn ] ; } } return maxId ; }
Get the max id of the collection, given the name of the id's property
 @param  {Array<Object>} arrayCollection the collection to check
 @param  {string}        idColumn        the name of id column (skip to use the default variant)
 @return {number}                        the max id, 0 if the ids are not found in the collection
Get the max id of the collection given the name of the id ' s property @param { Array<Object > } arrayCollection the collection to check @param { string } idColumn the name of id column ( skip to use the default variant ) @return { number } the max id 0 if the ids are not found in the collection