import { shortenNumber } from '../utils/shorten-number' ; import { shortenNumberList } from '../utils/shorten-number-list' ; const FLAG_POS1 = 3 ; const FLAG_POS2 = 4 ; const LOOP_LEN = 7 ; export const stringifyArc = ( s ) : string => shortenNumberList ( s . reduce ( ( prev , curr , index ) => { if ( index % LOOP_LEN === FLAG_POS1 || index % LOOP_LEN === FLAG_POS2 || index === s . length - 1 ) { return `${ prev }${ shortenNumber ( curr ) }` ; } else { return `${ prev }${ shortenNumber ( curr ) },` ; } } , '' ) ) ;