import { get } from 'lodash' ; import { Filter , isExistsFilter , FILTERS } from '../../../../../common' ; export const mapExists = ( filter ) => { if ( isExistsFilter ( filter ) ) { return { type : FILTERS . EXISTS , value : FILTERS . EXISTS , key : get ( filter , 'exists.field' ) , } ; } throw filter ; } ;