import { composeValidators , patternValidator } from '../../../common/shared_imports' ; import { AggName } from '../../../common/types/aggregations' ; export function isAggName ( arg ) { const validatorFn = composeValidators ( patternValidator ( /^[^\s]/ ) , patternValidator ( /[^\s]$/ ) , patternValidator ( /^[^\[\]>]+$/ ) ) ; return validatorFn ( arg ) === null ; }