UNPKG

react-native-aps

Version:
44 lines (38 loc) 1.47 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateAdNetworkInfo = validateAdNetworkInfo; var _AdNetwork = require("./AdNetwork"); /* * Copyright (c) 2022-present Adversport & Contributors * * This file is part of react-native-aps. * * react-native-aps is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, version 3 of the License. * * react-native-aps is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Foobar. If not, see <https://www.gnu.org/licenses/>. */ /** * @internal */ function validateAdNetworkInfo(adNetworkInfo) { if (typeof adNetworkInfo !== 'object') { throw new Error("'adNetworkInfo' expected an object value"); } if (!(0, _AdNetwork.isAdNetwork)(adNetworkInfo.adNetwork)) { throw new Error("'adNetworkInfo.adNetwork' expected one of AdNetwork values"); } if (adNetworkInfo.adNetworkProperties && typeof adNetworkInfo.adNetworkProperties !== 'object') { throw new Error("'adNetworkInfo.adNetworkProperties' expected an object value"); } } //# sourceMappingURL=AdNetworkInfo.js.map