@botonic/react
Version:
Build Chatbots using React
8 lines (6 loc) • 306 B
text/typescript
import { BotonicAction, BotonicActionType } from '@botonic/core'
export const getParsedAction = (botonicAction: BotonicActionType) => {
const splittedAction = botonicAction.split(`${BotonicAction.CreateCase}:`)
if (splittedAction.length <= 1) return undefined
return JSON.parse(splittedAction[1])
}