UNPKG

@adyen/react-native

Version:

Wraps Adyen Checkout Drop-In and Components for iOS and Android for convenient use with React Native

17 lines (16 loc) 657 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setEntitlements = setEntitlements; const in_app_payment_key = 'com.apple.developer.in-app-payments'; function setEntitlements(entitlements, input) { var _a; const identifiers = (_a = entitlements[in_app_payment_key]) !== null && _a !== void 0 ? _a : []; const newIdentifiers = Array.isArray(input) ? input : [input]; newIdentifiers .filter((id) => id && !identifiers.includes(id)) .forEach((id) => identifiers.push(id)); if (identifiers.length) { entitlements[in_app_payment_key] = identifiers; } return entitlements; }