UNPKG

2.54 kBSource Map (JSON)View Raw
1{"version":3,"file":"ionic-native-plugin.js","sourceRoot":"","sources":["../../../src/@ionic-native/core/ionic-native-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAE7B;IAAA;IA0DA,CAAC;IAlDC;;;OAGG;IACI,2BAAS,GAAhB;QACE,IAAM,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;QAC/D,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;OAEG;IACI,2BAAS,GAAhB;QACE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,OAAO,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;SACpC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACI,+BAAa,GAApB;QACE,IAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,OAAO,UAAU,CAAC;IACpB,CAAC;IAED;;OAEG;IACI,8BAAY,GAAnB;QACE,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,sCAAoB,GAA3B;QACE,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACI,uCAAqB,GAA5B;QACE,IAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAxDM,4BAAU,GAAG,EAAE,CAAC;IAChB,2BAAS,GAAG,EAAE,CAAC;IACf,wBAAM,GAAG,EAAE,CAAC;IACZ,sBAAI,GAAG,EAAE,CAAC;IACV,2BAAS,GAAa,EAAE,CAAC;IACzB,yBAAO,GAAG,EAAE,CAAC;IAoDtB,wBAAC;CAAA,AA1DD,IA0DC;SA1DY,iBAAiB","sourcesContent":["import { checkAvailability } from './decorators/common';\nimport { get } from './util';\n\nexport class IonicNativePlugin {\n static pluginName = '';\n static pluginRef = '';\n static plugin = '';\n static repo = '';\n static platforms: string[] = [];\n static install = '';\n\n /**\n * Returns a boolean that indicates whether the plugin is installed\n * @return {boolean}\n */\n static installed(): boolean {\n const isAvailable = checkAvailability(this.pluginRef) === true;\n return isAvailable;\n }\n\n /**\n * Returns the original plugin object\n */\n static getPlugin(): any {\n if (typeof window !== 'undefined') {\n return get(window, this.pluginRef);\n }\n return null;\n }\n\n /**\n * Returns the plugin's name\n */\n static getPluginName(): string {\n const pluginName = this.pluginName;\n return pluginName;\n }\n\n /**\n * Returns the plugin's reference\n */\n static getPluginRef(): string {\n const pluginRef = this.pluginRef;\n return pluginRef;\n }\n\n /**\n * Returns the plugin's install name\n */\n static getPluginInstallName(): string {\n const plugin = this.plugin;\n return plugin;\n }\n\n /**\n * Returns the plugin's supported platforms\n */\n static getSupportedPlatforms(): string[] {\n const platform = this.platforms;\n return platform;\n }\n}\n"]}
\No newline at end of file