Socket
Socket
Sign inDemoInstall

@w6s/cordova-import

Package Overview
Dependencies
5
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.1 to 1.3.2

.DS_Store

4

lib/@w6s/cordova-import-es.js
/*!
* @w6s/cordova-import.js v1.3.1
* (c) 2019 WorkPlusFE
* @w6s/cordova-import.js v1.3.2
* (c) 2020 WorkPlusFE
*/

@@ -5,0 +5,0 @@

/*!
* @w6s/cordova-import.js v1.3.1
* (c) 2019 WorkPlusFE
* @w6s/cordova-import.js v1.3.2
* (c) 2020 WorkPlusFE
*/
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";var o=function(t,e,r,n,o,i,a,u){if(!t){var c;if(void 0===e)c=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[r,n,o,i,a,u],s=0;(c=Error(e.replace(/%s/g,function(){return f[s++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Nt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(t){return!!~t.indexOf("android")}function u(){var t=function(){for(var t=document.getElementsByTagName("script"),e="",r=0;r<t.length;r+=1){var n=t[r];if(n.src&&~n.src.indexOf("/".concat(f.SDK_NAME))){e=n.src;break}}return e}();if(t)return t.split(f.SDK_NAME)[0]}var t,c=(function(t,e){var n="__lodash_hash_undefined__",o=9007199254740991,r="[object Arguments]",i="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",c="[object Null]",d="[object Object]",f="[object Proxy]",s="[object Undefined]",l=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[r]=v["[object Array]"]=v["[object ArrayBuffer]"]=v["[object Boolean]"]=v["[object DataView]"]=v["[object Date]"]=v["[object Error]"]=v[a]=v["[object Map]"]=v["[object Number]"]=v[d]=v["[object RegExp]"]=v["[object Set]"]=v["[object String]"]=v["[object WeakMap]"]=!1;var h="object"==typeof Nt&&Nt&&Nt.Object===Object&&Nt,_="object"==typeof self&&self&&self.Object===Object&&self,y=h||_||Function("return this")(),b=e&&!e.nodeType&&e,g=b&&t&&!t.nodeType&&t,j=g&&g.exports===b,m=j&&h.process,w=function(){try{var t=g&&g.require&&g.require("util").types;return t||m&&m.binding&&m.binding("util")}catch(t){}}(),A=w&&w.isTypedArray;var O,S,z,x=Array.prototype,E=Object.prototype,T=y["__core-js_shared__"],U=Function.prototype.toString,k=E.hasOwnProperty,D=(O=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",M=E.toString,P=U.call(Object),I=RegExp("^"+U.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=j?y.Buffer:void 0,F=y.Symbol,K=y.Uint8Array,N=B?B.allocUnsafe:void 0,C=(S=Object.getPrototypeOf,function(t){return S(z(t))}),$=(z=Object).create,H=E.propertyIsEnumerable,q=x.splice,R=F?F.toStringTag:void 0,L=function(){try{var t=_t(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),V=B?B.isBuffer:void 0,G=Math.max,W=Date.now,J=_t(y,"Map"),Q=_t(Object,"create"),X=function(t){if(!kt(t))return{};if($)return $(t);Y.prototype=t;var e=new Y;return Y.prototype=void 0,e};function Y(){}function Z(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function tt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function et(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function rt(t){var e=this.__data__=new tt(t);this.size=e.size}function nt(t,e){var r=zt(t),n=!r&&St(t),o=!r&&!n&&Et(t),i=!r&&!n&&!o&&Pt(t),a=r||n||o||i,u=a?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=u.length;for(var f in t)!e&&!k.call(t,f)||a&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||yt(f,c))||u.push(f);return u}function ot(t,e,r){(void 0===r||Ot(t[e],r))&&(void 0!==r||e in t)||at(t,e,r)}function it(t,e){for(var r=t.length;r--;)if(Ot(t[r][0],e))return r;return-1}function at(t,e,r){"__proto__"==e&&L?L(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}Z.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},Z.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Z.prototype.get=function(t){var e=this.__data__;if(Q){var r=e[t];return r===n?void 0:r}return k.call(e,t)?e[t]:void 0},Z.prototype.has=function(t){var e=this.__data__;return Q?void 0!==e[t]:k.call(e,t)},Z.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Q&&void 0===e?n:e,this},tt.prototype.clear=function(){this.__data__=[],this.size=0},tt.prototype.delete=function(t){var e=this.__data__,r=it(e,t);return 0<=r&&(r==e.length-1?e.pop():q.call(e,r,1),--this.size,!0)},tt.prototype.get=function(t){var e=this.__data__,r=it(e,t);return r<0?void 0:e[r][1]},tt.prototype.has=function(t){return-1<it(this.__data__,t)},tt.prototype.set=function(t,e){var r=this.__data__,n=it(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},et.prototype.clear=function(){this.size=0,this.__data__={hash:new Z,map:new(J||tt),string:new Z}},et.prototype.delete=function(t){var e=dt(this,t).delete(t);return this.size-=e?1:0,e},et.prototype.get=function(t){return dt(this,t).get(t)},et.prototype.has=function(t){return dt(this,t).has(t)},et.prototype.set=function(t,e){var r=dt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},rt.prototype.clear=function(){this.__data__=new tt,this.size=0},rt.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},rt.prototype.get=function(t){return this.__data__.get(t)},rt.prototype.has=function(t){return this.__data__.has(t)},rt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof tt){var n=r.__data__;if(!J||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new et(n)}return r.set(t,e),this.size=r.size,this};var ut,ct=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),a=i.length;a--;){var u=i[ut?a:++n];if(!1===e(o[u],u,o))break}return t};function ft(t){return null==t?void 0===t?s:c:R&&R in Object(t)?function(t){var e=k.call(t,R),r=t[R];try{var n=!(t[R]=void 0)}catch(t){}var o=M.call(t);n&&(e?t[R]=r:delete t[R]);return o}(t):M.call(t)}function st(t){return Dt(t)&&ft(t)==r}function lt(t){return!(!kt(t)||(e=t,D&&D in e))&&(Tt(t)?I:l).test(function(t){if(null!=t){try{return U.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function pt(t){if(!kt(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=bt(t),r=[];for(var n in t)("constructor"!=n||!e&&k.call(t,n))&&r.push(n);return r}function vt(n,o,i,a,u){n!==o&&ct(o,function(t,e){if(u=u||new rt,kt(t))!function(t,e,r,n,o,i,a){var u=gt(t,r),c=gt(e,r),f=a.get(c);if(f)return ot(t,r,f);var s=i?i(u,c,r+"",t,e,a):void 0,l=void 0===s;if(l){var p=zt(c),v=!p&&Et(c),h=!p&&!v&&Pt(c);s=c,p||v||h?s=zt(u)?u:function(t){return Dt(t)&&xt(t)}(u)?function(t,e){var r=-1,n=t.length;e=e||Array(n);for(;++r<n;)e[r]=t[r];return e}(u):v?function(t,e){if(e)return t.slice();var r=t.length,n=N?N(r):new t.constructor(r);return t.copy(n),n}(c,!(l=!1)):h?function(t,e){var r=e?function(t){var e=new t.constructor(t.byteLength);return new K(e).set(new K(t)),e}(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(c,!(l=!1)):[]:function(t){if(!Dt(t)||ft(t)!=d)return!1;var e=C(t);if(null===e)return!0;var r=k.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&U.call(r)==P}(c)||St(c)?St(s=u)?s=function(t){return function(t,e,r,n){var o=!r;r=r||{};var i=-1,a=e.length;for(;++i<a;){var u=e[i],c=n?n(r[u],t[u],u,r,t):void 0;void 0===c&&(c=t[u]),o?at(r,u,c):(l=c,p=(f=r)[s=u],k.call(f,s)&&Ot(p,l)&&(void 0!==l||s in f)||at(f,s,l))}var f,s,l,p;return r}(t,It(t))}(u):kt(u)&&!Tt(u)||(s=function(t){return"function"!=typeof t.constructor||bt(t)?{}:X(C(t))}(c)):l=!1}l&&(a.set(c,s),o(s,c,n,i,a),a.delete(c));ot(t,r,s)}(n,o,e,i,vt,a,u);else{var r=a?a(gt(n,e),t,e+"",n,o,u):void 0;void 0===r&&(r=t),ot(n,e,r)}},It)}function ht(t,e){return At((i=t,u=Kt,a=G(void 0===(a=e)?i.length-1:a,0),function(){for(var t=arguments,e=-1,r=G(t.length-a,0),n=Array(r);++e<r;)n[e]=t[a+e];e=-1;for(var o=Array(a+1);++e<a;)o[e]=t[e];return o[a]=u(n),function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(i,this,o)}),t+"");var i,a,u}function dt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function _t(t,e){var r,n,o=(n=e,null==(r=t)?void 0:r[n]);return lt(o)?o:void 0}function yt(t,e){var r=typeof t;return!!(e=null==e?o:e)&&("number"==r||"symbol"!=r&&p.test(t))&&-1<t&&t%1==0&&t<e}function bt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||E)}function gt(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var jt,mt,wt,At=(jt=L?function(t,e){return L(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:Kt,wt=mt=0,function(){var t=W(),e=16-(t-wt);if(wt=t,0<e){if(800<=++mt)return arguments[0]}else mt=0;return jt.apply(void 0,arguments)});function Ot(t,e){return t===e||t!=t&&e!=e}var St=st(function(){return arguments}())?st:function(t){return Dt(t)&&k.call(t,"callee")&&!H.call(t,"callee")},zt=Array.isArray;function xt(t){return null!=t&&Ut(t.length)&&!Tt(t)}var Et=V||function(){return!1};function Tt(t){if(!kt(t))return!1;var e=ft(t);return e==a||e==u||e==i||e==f}function Ut(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=o}function kt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Dt(t){return null!=t&&"object"==typeof t}var Mt,Pt=A?(Mt=A,function(t){return Mt(t)}):function(t){return Dt(t)&&Ut(t.length)&&!!v[ft(t)]};function It(t){return xt(t)?nt(t,!0):pt(t)}var Bt,Ft=(Bt=function(t,e,r){vt(t,e,r)},ht(function(t,e){var r=-1,n=e.length,o=1<n?e[n-1]:void 0,i=2<n?e[2]:void 0;for(o=3<Bt.length&&"function"==typeof o?(n--,o):void 0,i&&function(t,e,r){if(!kt(r))return!1;var n=typeof e;return!!("number"==n?xt(r)&&yt(e,r.length):"string"==n&&e in r)&&Ot(r[e],t)}(e[0],e[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++r<n;){var a=e[r];a&&Bt(t,a,r,o)}return t}));function Kt(t){return t}t.exports=Ft}(t={exports:{}},t.exports),t.exports),f={SDK_NAME:"cordova-import.js",SDK_HOST:null,cordovajs:{iOS:"ios.cordova.min.js",android:"android.cordova.min.js",local:"applocal://cordova.min.js"},pcSDKUri:""},s=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t?c(f,{SDK_HOST:t}):f}var t,r,n;return t=e,(r=[{key:"getImportUri",value:function(){if(this.mustUseHttpModel()&&this.config.SDK_HOST){var t=this.getCurrentPlatformByUserAgent();return o(t,"Please open in the correct webview"),r=t,"".concat((e=this.config).SDK_HOST).concat(e.cordovajs[r])}var e,r;return this.config.cordovajs.local}},{key:"mustUseHttpModel",value:function(){return!(!self.frameElement||"IFRAME"!=self.frameElement.tagName)||!("https:"!==window.location.protocol||!a(this.userAgent)||/x5webkit|mqqbrowser|tbs/.test(t));var t}},{key:"getCurrentPlatformByUserAgent",value:function(){return~this.userAgent.indexOf("iphone")?"iOS":!!a(this.userAgent)&&"android"}},{key:"userAgent",get:function(){return window.navigator.userAgent.toLowerCase()}}])&&i(t.prototype,r),n&&i(t,n),e}();!function(){try{if(!~navigator.userAgent.indexOf("workplus"))return;var t=u(),e=new s(t).getImportUri();r=e,(n=document.createElement("script")).setAttribute("type","text/javascript"),n.setAttribute("src",r),document.getElementsByTagName("head")[0].appendChild(n)}catch(t){o(!1,t)}var r,n}()});
{
"name": "@w6s/cordova-import",
"version": "1.3.1",
"version": "1.3.2",
"description": "Automatic CordovaJs import util.",

@@ -8,2 +8,3 @@ "main": "lib/@w6s/cordova-import-es.js",

"script:tag": "lib/@w6s/cordova-import.js",
"typings": "types/index.d.ts",
"publishConfig": {

@@ -10,0 +11,0 @@ "access": "public"

@@ -9,3 +9,3 @@ # cordova-import [![Build Status](https://travis-ci.org/WorkPlusFE/cordova-import.svg?branch=master)](https://travis-ci.org/WorkPlusFE/cordova-import) [![npm version](https://badge.fury.io/js/%40w6s%2Fcordova-import.svg)](https://badge.fury.io/js/%40w6s%2Fcordova-import)

相关脚本可在[Release页面](https://github.com/WorkPlusFE/cordova-import/releases/tag/v1.3)进行下载。
相关脚本可在[Release页面](https://github.com/WorkPlusFE/cordova-import/releases/tag/v1.3.1)进行下载。

@@ -12,0 +12,0 @@ #### 一、通过 script 标签直接引入

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc