twilio-ccai-fulfillment-tools
Version:
A collection of tools to assist in the creation of Twilio CCAI Integration cards via fulfillment scripts
13 lines (11 loc) • 379 B
text/typescript
import { GoogleCloudDialogflowV2Context } from 'actions-on-google';
export const findContext = (
contains: string,
contexts?: GoogleCloudDialogflowV2Context[]
): GoogleCloudDialogflowV2Context | undefined => {
return contexts
? contexts.find(
(context) => context.name && context.name.indexOf(contains) > -1
)
: undefined;
};