import { PaymentMethod } from "../types/paymentMethod"; export const paymentMethodMask = (method: PaymentMethod) => { return method.method.toLowerCase().match(/.*(visa|mastercard|american express).*/) ? `•••• •••• •••• ${method.summary}` : method.summary; };