@transcend-io/typescript-webhook-example
Version:
Example of a webhook that can be integrated with Transcend.
18 lines • 588 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkIfFraudster = void 0;
/**
* 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
*/
function checkIfFraudster(email) {
const flag = email.split('@')[0].split('+')[1];
return ['thefraudster', 'fraud', 'fraudster', 'activeuser'].includes(flag);
}
exports.checkIfFraudster = checkIfFraudster;
//# sourceMappingURL=checkIfFraudster.js.map
;