UNPKG

@overture-stack/lyric

Version:
12 lines (11 loc) 557 B
/** * Finds a matching validator configuration entry based on the provided 'categoryId' and 'entityName * @param params * @param params.validatorConfig - The list of all configured validator entries. * @param params.categoryId - The category ID to match. * @param params.entityName - The entity name to match. * @returns */ export const findValidatorEntry = ({ validatorConfig, categoryId, entityName, }) => { return validatorConfig.find((config) => config.categoryId.toString() === categoryId.toString() && config.entityName === entityName); };