UNPKG

@adyen/adyen-web

Version:

[![npm](https://img.shields.io/npm/v/@adyen/adyen-web.svg)](https://www.npmjs.com/package/@adyen/adyen-web)

3 lines (2 loc) 365 B
import{ERROR_FIELD_REQUIRED as r,ERROR_FIELD_INVALID as e}from"../core/Errors/constants.js";const s=(s,o,t,n=!0)=>{if(o?.errorMessage&&"string"==typeof o.errorMessage){const a=o.errorMessage,g=[r,e].includes(a),c={values:{label:n?t?.toLowerCase():t}};return g?s.get(a,c):s.get(a)}return!!o};export{s as getErrorMessage}; //# sourceMappingURL=getErrorMessage.js.map