import { isEmpty , isString } from 'lodash/fp' ; import { ESQuery } from '../../../common/typed_json' ; export const createQueryFilterClauses = ( filterQuery ) => ! isEmpty ( filterQuery ) ? [ isString ( filterQuery ) ? JSON . parse ( filterQuery ) : filterQuery ] : [ ] ;