UNPKG

sweetalert2

Version:

A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes, supported fork of sweetalert

10 lines (9 loc) 337 B
/** * Adapt a legacy inputValidator for use with expectRejections=false */ export const adaptInputValidator = (legacyValidator) => { return function adaptedInputValidator (inputValue, extraParams) { return legacyValidator.call(this, inputValue, extraParams) .then(() => undefined, validationError => validationError) } }