import { Boost , BoostType } from '../types' ; export const getBoostSummary = ( boost ) : string => { if ( boost . type === BoostType . Value ) { return ! boost . value ? '' : boost . value . filter ( ( v ) => v . trim ( ) !== '' ) . join ( ',' ) ; } else if ( boost . type === BoostType . Proximity ) { return boost . function || '' ; } else { return [ boost . function || '' , boost . operation || '' ] . join ( ' ' ) . trim ( ) ; } } ;