nl_tokens: Takes an array of range objects and returns the array index for the first range with the longest span meaning that if there are multiple longest ranges with the same indices the index for the first one in the array will be returned .
pl_tokens: function find_largest_range ( rs ) { let r_id = - 1 , r_size = 0 , i ; if ( rs . length < 1 ) { return null ; } for ( i = 0 ; i < rs . length ; i ++ ) { if ( null === rs [ i ] ) { continue ; } // Set on first valid range and subsequently larger ranges if ( - 1 === r_id || <mask> [ i ] . indices [ 1 ] - rs [ i ] . indices [ 0 ] > r_size ) { r_id = i ; r_size = rs [ i ] . indices [ 1 ] - rs [ i ] . indices [ 0 ] ; } } return r_id ; }