import numeral from '@elastic/numeral' ; export function abbreviateWholeNumber ( value , maxDigits = 3 ) { if ( Math . abs ( value ) < Math . pow ( 10 , maxDigits ) ) { return value ; } else { return numeral ( value ) . format ( '0a' ) ; } }