Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ionic-native/core

Package Overview
Dependencies
Maintainers
6
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ionic-native/core - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

2

decorators/common.d.ts

@@ -10,3 +10,3 @@ /// <reference types="cordova" />

export declare function getPromise<T>(callback: (resolve: Function, reject?: Function) => any): Promise<T>;
export declare function wrapPromise(pluginObj: any, methodName: string, args: any[], opts?: CordovaOptions): any;
export declare function wrapPromise(pluginObj: any, methodName: string, args: any[], opts?: CordovaOptions): Promise<{}>;
/**

@@ -13,0 +13,0 @@ * Checks if plugin/cordova is available

@@ -1,2 +0,2 @@

import { Observable, fromEvent } from 'rxjs';
import { fromEvent, Observable } from 'rxjs';
export var ERR_CORDOVA_NOT_AVAILABLE = { error: 'cordova_not_available' };

@@ -143,4 +143,3 @@ export var ERR_PLUGIN_NOT_INSTALLED = { error: 'plugin_not_installed' };

pluginInstance = getPlugin(pluginRef);
if (!pluginInstance ||
(!!methodName && typeof pluginInstance[methodName] === 'undefined')) {
if (!pluginInstance || (!!methodName && typeof pluginInstance[methodName] === 'undefined')) {
if (!window.cordova) {

@@ -161,4 +160,3 @@ cordovaWarn(pluginName, methodName);

return (pluginObj._objectInstance &&
(!methodName ||
typeof pluginObj._objectInstance[methodName] !== 'undefined'));
(!methodName || typeof pluginObj._objectInstance[methodName] !== 'undefined'));
}

@@ -187,5 +185,3 @@ export function setIndex(args, opts, resolve, reject) {

}
else if (opts.callbackStyle === 'object' &&
opts.successName &&
opts.errorName) {
else if (opts.callbackStyle === 'object' && opts.successName && opts.errorName) {
var obj = {};

@@ -196,4 +192,3 @@ obj[opts.successName] = resolve;

}
else if (typeof opts.successIndex !== 'undefined' ||
typeof opts.errorIndex !== 'undefined') {
else if (typeof opts.successIndex !== 'undefined' || typeof opts.errorIndex !== 'undefined') {
var setSuccessIndex = function () {

@@ -200,0 +195,0 @@ // If we've specified a success/error index

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":4,"metadata":{"ERR_CORDOVA_NOT_AVAILABLE":{"error":"cordova_not_available"},"ERR_PLUGIN_NOT_INSTALLED":{"error":"plugin_not_installed"},"getPromise":{"__symbolic":"function"},"wrapPromise":{"__symbolic":"function"},"checkAvailability":{"__symbolic":"function"},"instanceAvailability":{"__symbolic":"function","parameters":["pluginObj","methodName"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"pluginObj"},"member":"_objectInstance"},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"reference","name":"methodName"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":232,"character":6},"right":"undefined"}}}},"setIndex":{"__symbolic":"function"},"callCordovaPlugin":{"__symbolic":"function"},"callInstance":{"__symbolic":"function"},"getPlugin":{"__symbolic":"function","parameters":["pluginRef"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"get"},"arguments":[{"__symbolic":"error","message":"Reference to a local symbol","line":4,"character":14,"context":{"name":"window"}},{"__symbolic":"reference","name":"pluginRef"}]}},"get":{"__symbolic":"function"},"pluginWarn":{"__symbolic":"function"},"cordovaWarn":{"__symbolic":"function"},"WrapFn":{"__symbolic":"interface"},"wrap":{"__symbolic":"error","message":"Lambda not supported","line":421,"character":20},"wrapInstance":{"__symbolic":"function","parameters":["pluginObj","methodName","opts"],"value":{"__symbolic":"error","message":"Lambda not supported","line":450,"character":9},"defaults":[null,null,{}]}}}]
[{"__symbolic":"module","version":4,"metadata":{"ERR_CORDOVA_NOT_AVAILABLE":{"error":"cordova_not_available"},"ERR_PLUGIN_NOT_INSTALLED":{"error":"plugin_not_installed"},"getPromise":{"__symbolic":"function"},"wrapPromise":{"__symbolic":"function"},"checkAvailability":{"__symbolic":"function"},"instanceAvailability":{"__symbolic":"function","parameters":["pluginObj","methodName"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"pluginObj"},"member":"_objectInstance"},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"reference","name":"methodName"}},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"error","message":"Expression form not supported","line":206,"character":20},"right":"undefined"}}}},"setIndex":{"__symbolic":"function"},"callCordovaPlugin":{"__symbolic":"function"},"callInstance":{"__symbolic":"function"},"getPlugin":{"__symbolic":"function","parameters":["pluginRef"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"get"},"arguments":[{"__symbolic":"error","message":"Reference to a local symbol","line":4,"character":14,"context":{"name":"window"}},{"__symbolic":"reference","name":"pluginRef"}]}},"get":{"__symbolic":"function"},"pluginWarn":{"__symbolic":"function"},"cordovaWarn":{"__symbolic":"function"},"WrapFn":{"__symbolic":"interface"},"wrap":{"__symbolic":"error","message":"Lambda not supported","line":372,"character":20},"wrapInstance":{"__symbolic":"function","parameters":["pluginObj","methodName","opts"],"value":{"__symbolic":"error","message":"Lambda not supported","line":393,"character":9},"defaults":[null,null,{}]}}}]

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":4,"metadata":{"cordovaFunctionOverride":{"__symbolic":"function","parameters":["pluginObj","methodName","args"],"value":{"__symbolic":"error","message":"Reference to a non-exported function","line":3,"character":9,"context":{"name":"overrideFunction"}},"defaults":[null,null,[]]}}}]
[{"__symbolic":"module","version":4,"metadata":{"cordovaFunctionOverride":{"__symbolic":"function","parameters":["pluginObj","methodName","args"],"value":{"__symbolic":"error","message":"Reference to a non-exported function","line":4,"character":9,"context":{"name":"overrideFunction"}},"defaults":[null,null,[]]}}}]

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":4,"metadata":{"cordova":{"__symbolic":"function","parameters":["pluginObj","methodName","config","args"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./common","name":"wrap","line":4,"character":9},"arguments":[{"__symbolic":"reference","name":"pluginObj"},{"__symbolic":"reference","name":"methodName"},{"__symbolic":"reference","name":"config"}]},"member":"apply"},"arguments":[{"__symbolic":"error","message":"Expression form not supported","line":4,"character":51},{"__symbolic":"reference","name":"args"}]}}}}]
[{"__symbolic":"module","version":4,"metadata":{"cordova":{"__symbolic":"function","parameters":["pluginObj","methodName","config","args"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./common","name":"wrap","line":9,"character":9},"arguments":[{"__symbolic":"reference","name":"pluginObj"},{"__symbolic":"reference","name":"methodName"},{"__symbolic":"reference","name":"config"}]},"member":"apply"},"arguments":[{"__symbolic":"error","message":"Expression form not supported","line":9,"character":51},{"__symbolic":"reference","name":"args"}]}}}}]

@@ -10,23 +10,35 @@ import { checkAvailability } from './decorators/common';

*/
IonicNativePlugin.installed = function () { return checkAvailability(this.pluginRef) === true; };
IonicNativePlugin.installed = function () {
return checkAvailability(this.pluginRef) === true;
};
/**
* Returns the original plugin object
*/
IonicNativePlugin.getPlugin = function () { return get(window, this.pluginRef); };
IonicNativePlugin.getPlugin = function () {
return get(window, this.pluginRef);
};
/**
* Returns the plugin's name
*/
IonicNativePlugin.getPluginName = function () { return this.pluginName; };
IonicNativePlugin.getPluginName = function () {
return this.pluginName;
};
/**
* Returns the plugin's reference
*/
IonicNativePlugin.getPluginRef = function () { return this.pluginRef; };
IonicNativePlugin.getPluginRef = function () {
return this.pluginRef;
};
/**
* Returns the plugin's install name
*/
IonicNativePlugin.getPluginInstallName = function () { return this.plugin; };
IonicNativePlugin.getPluginInstallName = function () {
return this.plugin;
};
/**
* Returns the plugin's supported platforms
*/
IonicNativePlugin.getSupportedPlatforms = function () { return this.platforms || []; };
IonicNativePlugin.getSupportedPlatforms = function () {
return this.platforms || [];
};
return IonicNativePlugin;

@@ -33,0 +45,0 @@ }());

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":4,"metadata":{"IonicNativePlugin":{"__symbolic":"class","statics":{"pluginName":{"__symbolic":"error","message":"Variable not initialized","line":4,"character":9},"pluginRef":{"__symbolic":"error","message":"Variable not initialized","line":6,"character":9},"plugin":{"__symbolic":"error","message":"Variable not initialized","line":8,"character":9},"repo":{"__symbolic":"error","message":"Variable not initialized","line":10,"character":9},"platforms":{"__symbolic":"error","message":"Variable not initialized","line":12,"character":9},"install":{"__symbolic":"error","message":"Variable not initialized","line":14,"character":9},"installed":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./decorators/common","name":"checkAvailability","line":20,"character":39},"arguments":[{"__symbolic":"error","message":"Expression form not supported","line":20,"character":57}]},"right":true}},"getPlugin":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util","name":"get","line":25,"character":35},"arguments":[{"__symbolic":"reference","name":"window"},{"__symbolic":"error","message":"Expression form not supported","line":25,"character":47}]}},"getPluginName":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"error","message":"Expression form not supported","line":30,"character":42}},"getPluginRef":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"error","message":"Expression form not supported","line":35,"character":41}},"getPluginInstallName":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"error","message":"Expression form not supported","line":40,"character":49}},"getSupportedPlatforms":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"error","message":"Expression form not supported","line":45,"character":52},"right":[]}}}}}}]
[{"__symbolic":"module","version":4,"metadata":{"IonicNativePlugin":{"__symbolic":"class","statics":{"pluginName":{"__symbolic":"error","message":"Variable not initialized","line":4,"character":9},"pluginRef":{"__symbolic":"error","message":"Variable not initialized","line":6,"character":9},"plugin":{"__symbolic":"error","message":"Variable not initialized","line":8,"character":9},"repo":{"__symbolic":"error","message":"Variable not initialized","line":10,"character":9},"platforms":{"__symbolic":"error","message":"Variable not initialized","line":12,"character":9},"install":{"__symbolic":"error","message":"Variable not initialized","line":14,"character":9},"installed":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./decorators/common","name":"checkAvailability","line":21,"character":11},"arguments":[{"__symbolic":"error","message":"Expression form not supported","line":21,"character":29}]},"right":true}},"getPlugin":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"./util","name":"get","line":28,"character":11},"arguments":[{"__symbolic":"reference","name":"window"},{"__symbolic":"error","message":"Expression form not supported","line":28,"character":23}]}},"getPluginName":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"error","message":"Expression form not supported","line":35,"character":11}},"getPluginRef":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"error","message":"Expression form not supported","line":42,"character":11}},"getPluginInstallName":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"error","message":"Expression form not supported","line":49,"character":11}},"getSupportedPlatforms":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"error","message":"Expression form not supported","line":56,"character":11},"right":[]}}}}}}]

@@ -1,1 +0,1 @@

{"description":"Ionic Native - Native plugins for ionic apps","module":"index.js","typings":"index.d.ts","author":"ionic","license":"MIT","repository":{"type":"git","url":"https://github.com/ionic-team/ionic-native.git"},"name":"@ionic-native/core","dependencies":{"@types/cordova":"latest"},"peerDependencies":{"rxjs":"*"},"version":"5.0.0"}
{"description":"Ionic Native - Native plugins for ionic apps","module":"index.js","typings":"index.d.ts","author":"ionic","license":"MIT","repository":{"type":"git","url":"https://github.com/ionic-team/ionic-native.git"},"name":"@ionic-native/core","dependencies":{"@types/cordova":"latest"},"peerDependencies":{"rxjs":"^6.3.0"},"version":"5.1.0"}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc