UNPKG

1.75 kBJavaScriptView Raw
1import { checkAvailability } from './decorators/common';
2import { get } from './util';
3var IonicNativePlugin = /** @class */ (function () {
4 function IonicNativePlugin() {
5 }
6 /**
7 * Returns a boolean that indicates whether the plugin is installed
8 * @return {boolean}
9 */
10 IonicNativePlugin.installed = function () {
11 var isAvailable = checkAvailability(this.pluginRef) === true;
12 return isAvailable;
13 };
14 /**
15 * Returns the original plugin object
16 */
17 IonicNativePlugin.getPlugin = function () {
18 if (typeof window !== 'undefined') {
19 return get(window, this.pluginRef);
20 }
21 return null;
22 };
23 /**
24 * Returns the plugin's name
25 */
26 IonicNativePlugin.getPluginName = function () {
27 var pluginName = this.pluginName;
28 return pluginName;
29 };
30 /**
31 * Returns the plugin's reference
32 */
33 IonicNativePlugin.getPluginRef = function () {
34 var pluginRef = this.pluginRef;
35 return pluginRef;
36 };
37 /**
38 * Returns the plugin's install name
39 */
40 IonicNativePlugin.getPluginInstallName = function () {
41 var plugin = this.plugin;
42 return plugin;
43 };
44 /**
45 * Returns the plugin's supported platforms
46 */
47 IonicNativePlugin.getSupportedPlatforms = function () {
48 var platform = this.platforms;
49 return platform;
50 };
51 IonicNativePlugin.pluginName = '';
52 IonicNativePlugin.pluginRef = '';
53 IonicNativePlugin.plugin = '';
54 IonicNativePlugin.repo = '';
55 IonicNativePlugin.platforms = [];
56 IonicNativePlugin.install = '';
57 return IonicNativePlugin;
58}());
59export { IonicNativePlugin };
60//# sourceMappingURL=ionic-native-plugin.js.map
\No newline at end of file