From c144b87e136b6800acae9d5ac658f43d91b20bcd Mon Sep 17 00:00:00 2001 From: Ibrahim Hadeed Date: Sun, 6 Mar 2016 15:27:26 -0500 Subject: [PATCH] refactor: added semi-columns --- src/index.ts | 6 +++--- src/plugins/plugin.ts | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/index.ts b/src/index.ts index f1011094..a94f4e82 100644 --- a/src/index.ts +++ b/src/index.ts @@ -66,7 +66,7 @@ window['IonicNative'] = { StatusBar: StatusBar, Toast: Toast, TouchID: TouchID -} +}; // To help developers using cordova, we listen for the device ready event and // log an error if it didn't fire in a reasonable amount of time. Generally, @@ -76,9 +76,9 @@ let before = +new Date; let didFireReady = false; document.addEventListener('deviceready', function() { - console.log('DEVICE READY FIRED AFTER', (+new Date - before), 'ms') + console.log('DEVICE READY FIRED AFTER', (+new Date - before), 'ms'); didFireReady = true; -}) +}); setTimeout(function() { if(!didFireReady && window.cordova) { diff --git a/src/plugins/plugin.ts b/src/plugins/plugin.ts index 3b9a3d49..3459cdc6 100644 --- a/src/plugins/plugin.ts +++ b/src/plugins/plugin.ts @@ -11,10 +11,10 @@ import {Observable} from 'rxjs/Observable'; export const getPlugin = function(pluginRef: string): any { return get(window, pluginRef); -} +}; export const isInstalled = function(pluginRef: string): boolean { return !!getPlugin(pluginRef); -} +}; export const pluginWarn = function(pluginObj: any, method: string) { var pluginName = pluginObj.name; var plugin = pluginObj.plugin; @@ -24,14 +24,14 @@ export const pluginWarn = function(pluginObj: any, method: string) { console.warn('Native: tried accessing the ' + pluginName + ' plugin but it\'s not installed.'); } console.warn('Install the ' + pluginName + ' plugin: \'cordova plugin add ' + plugin + '\''); -} +}; export const cordovaWarn = function(pluginName: string, method: string) { if(method) { console.warn('Native: tried calling ' + pluginName + '.' + method + ', but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'); } else { console.warn('Native: tried accessing the ' + pluginName + ' plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator'); } -} +}; function callCordovaPlugin(pluginObj:any, methodName:string, args:any[], opts:any={}, resolve?: Function, reject?: Function) { // Try to figure out where the success/error callbacks need to be bound @@ -61,7 +61,7 @@ function callCordovaPlugin(pluginObj:any, methodName:string, args:any[], opts:an cordovaWarn(pluginObj.name, methodName); reject && reject({ error: 'cordova_not_available' - }) + }); return; } @@ -130,7 +130,7 @@ export const wrap = function(pluginObj:any, methodName:string, opts:any = {}) { return wrapPromise(pluginObj, methodName, args, opts); } } -} +}; /** * Class decorator specifying Plugin metadata. Required for all plugins. @@ -145,7 +145,7 @@ export function Plugin(config) { cls['installed'] = function() { return !!getPlugin(config.pluginRef); - } + }; return cls; } @@ -186,7 +186,7 @@ export function CordovaProperty(target: Function, key: string, descriptor: Typed return {}; } return originalMethod.apply(this, args); - } + }; return descriptor; }