UNPKG

typescript-webhook-example

Version:

Example of a webhook that can be integrated with Transcend.

14 lines (13 loc) 407 B
/** * Check user against fraud systems * Is this user suspected of fraud? * * Since this is a demo, it just checks for name+fraud@example.com * * @param email - Email to look up * @returns True if fraudster */ export function checkIfFraudster(email: string): boolean { const flag = email.split('@')[0].split('+')[1]; return ['thefraudster', 'fraud', 'fraudster', 'activeuser'].includes(flag); }