(pluginName: string)
| 25 | const isNativePlatform = () => getPlatform() !== 'web'; |
| 26 | |
| 27 | const isPluginAvailable = (pluginName: string): boolean => { |
| 28 | const plugin = registeredPlugins.get(pluginName); |
| 29 | |
| 30 | if (plugin?.platforms.has(getPlatform())) { |
| 31 | // JS implementation available for the current platform. |
| 32 | return true; |
| 33 | } |
| 34 | |
| 35 | if (getPluginHeader(pluginName)) { |
| 36 | // Native implementation available. |
| 37 | return true; |
| 38 | } |
| 39 | |
| 40 | return false; |
| 41 | }; |
| 42 | |
| 43 | const getPluginHeader = (pluginName: string): PluginHeader | undefined => |
| 44 | cap.PluginHeaders?.find((h) => h.name === pluginName); |
nothing calls this directly
no test coverage detected