cordova-plugin-insider 2.2.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/www/Utils.js CHANGED
@@ -1,20 +1,22 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
4
  module.exports = {
4
- asyncExec: (className, reference, args = []) => {
5
- return new Promise((resolve, reject) => {
6
- window.cordova.exec(resolve, reject, className, reference, args);
7
- });
8
- },
9
- generateJSONErrorString: (error) => {
10
- return ('[InsiderCordova][JavaScriptError] ' + error);
11
- },
12
- checkParameters(parameters) {
13
- return parameters.some((parameterConfig) => {
14
- return parameterConfig.type !== typeof parameterConfig.value;
15
- });
16
- },
17
- showParameterWarningLog(functionName) {
18
- console.warn("[InsiderCordova] paramaters is not valid, function: " + functionName);
19
- }
5
+ asyncExec: function asyncExec(className, reference) {
6
+ var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
7
+ return new Promise(function (resolve, reject) {
8
+ window.cordova.exec(resolve, reject, className, reference, args);
9
+ });
10
+ },
11
+ generateJSONErrorString: function generateJSONErrorString(error) {
12
+ return '[InsiderCordova][JavaScriptError] ' + error;
13
+ },
14
+ checkParameters: function checkParameters(parameters) {
15
+ return parameters.some(function (parameterConfig) {
16
+ return parameterConfig.type !== _typeof(parameterConfig.value);
17
+ });
18
+ },
19
+ showParameterWarningLog: function showParameterWarningLog(functionName) {
20
+ console.warn("[InsiderCordova] paramaters is not valid, function: " + functionName);
21
+ }
20
22
  };