MCPcopy
hub / github.com/zoontek/react-native-bootsplash / requireAddon

Function requireAddon

src/extras/utils.ts:807–845  ·  view source on GitHub ↗
({
  executeAddon,
  licenseKey,
}: Props)

Source from the content-addressed store, hash-verified

805};
806
807export const requireAddon = ({
808 executeAddon,
809 licenseKey,
810}: Props):
811 | {
812 execute: (config: AddonConfig) => Promise<void>;
813
814 writeAndroidAssets: (_: {
815 androidOutputPath: string;
816 props: Props;
817 }) => Promise<void>;
818
819 writeIOSAssets: (_: {
820 iosOutputPath: string;
821 props: Props;
822 }) => Promise<void>;
823
824 writeWebAssets: (_: {
825 htmlTemplatePath: string;
826 props: Props;
827 }) => Promise<void>;
828
829 writeGenericAssets: (_: { props: Props }) => Promise<void>;
830
831 withAndroidColorsNight: (_: {
832 config: Expo.ExportedConfigWithProps;
833 props: Props;
834 }) => Promise<Expo.ExportedConfigWithProps>;
835 }
836 | undefined => {
837 if (licenseKey != null && executeAddon) {
838 try {
839 const addon = require("./addon");
840 return "default" in addon ? addon.default : addon;
841 } catch {
842 return;
843 }
844 }
845};

Callers 6

generateFunction · 0.90
withAndroidAssetsFunction · 0.90
withAndroidColorsNightFunction · 0.90
withIOSAssetsFunction · 0.90
withWebAssetsFunction · 0.90
withGenericAssetsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…