@adyen/adyen-platform-experience-web
Version:

23 lines (22 loc) • 735 B
JavaScript
import { EMPTY_ARRAY as a } from "../../../utils/value/constants.js";
const c = (o, s = a) => {
var e;
if (Array.isArray(o))
for (const t of o)
try {
const r = typeof t == "object" ? (e = t == null ? void 0 : t.key) == null ? void 0 : e.trim() : !1;
if (
// `fieldName` is expected to be a string (except in a case of misconfiguration)
typeof r == "string" && // `fieldName` should not be an empty string (except in a case of misconfiguration)
r && // `field` is a custom field if `fieldName` is not in the `standardFields` list
!s.includes(r)
)
return !0;
} catch {
}
return !1;
};
export {
c as default,
c as hasCustomField
};