UNPKG

@adyen/react-native

Version:

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

19 lines (18 loc) 617 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setImportSwift = setImportSwift; function setImportSwift(contents) { const importLine = 'import Adyen'; if (contents.includes(importLine)) { return contents; } const importExpo = 'import Expo'; if (contents.includes(importExpo)) { return contents.replace(importExpo, `${importExpo}\n${importLine}`); } const importUIKit = 'import UIKit'; if (contents.includes(importUIKit)) { return contents.replace(importUIKit, `${importUIKit}\n${importLine}`); } return contents; }