awesome-cordova-plugin.js 1.9 KB

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