import { getShorter } from '../utils/get-shorter' ; import { shortenPureDecimal } from '../utils/shorten-pure-decimal' ; import { toPercent } from './to-percent' ; import { toFixed } from './to-fixed' ; export const shortenAlpha = ( digit , s ) => { const perc = shortenPureDecimal ( toPercent ( digit , s ) ) ; const num = shortenPureDecimal ( `${ toFixed ( digit , s ) }` ) ; return getShorter ( num , perc ) ; } ;