@ued2345/octopus-util
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.octopus=t():e.octopus=t()}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){var e=navigator.userAgent;return{trident:e.indexOf("Trident")>-1,presto:e.indexOf("Presto")>-1,webKit:e.indexOf("AppleWebKit")>-1,gecko:e.indexOf("Gecko")>-1&&-1===e.indexOf("KHTML"),mobile:!!e.match(/AppleWebKit.*Mobile.*/)||e.indexOf("Mobile")>-1,ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:e.indexOf("Android")>-1||e.indexOf("Linux")>-1,iPhone:e.indexOf("iPhone")>-1,iPad:e.indexOf("iPad")>-1,webApp:-1===e.indexOf("Safari"),weixin:e.indexOf("MicroMessenger")>-1,qq:null!==e.match(/\sQQ/i),wpApp:e.indexOf("WangPaiMobile")>-1}}},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0),r=n(2);t.default={getBrowser:i.default,jsBridge:r.default}},function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t.__esModule=!0;var o=new(function(e){function t(){return e.call(this)||this}return r(t,e),t.prototype.callHandler=function(t,n){e.prototype.init.call(this,(function(e){e.callHandler("jsCallJavaAllInOne",t,n)}))},t.prototype.registerHandler=function(t,n){e.prototype.init.call(this,(function(e){e.registerHandler(t,n)}))},t}(n(3).default));o.first(),t.default={callHandler:o.callHandler,registerHandler:o.registerHandler}},function(e,t,n){"use strict";t.__esModule=!0;var i=n(0).default(),r=function(){function e(){this.isIOS=i.ios}return e.prototype.init=function(e){if(this.isIOS){if(window.WebViewJavascriptBridge)return e(window.WebViewJavascriptBridge);if(window.WVJBCallbacks)return window.WVJBCallbacks.push(e);window.WVJBCallbacks=[e];var t=document.createElement("iframe");t.style.display="none",t.src="wvjbscheme://__BRIDGE_LOADED__",document.documentElement.appendChild(t),setTimeout((function(){document.documentElement.removeChild(t)}),0)}else window.WebViewJavascriptBridge?e(window.WebViewJavascriptBridge):document.addEventListener("WebViewJavascriptBridgeReady",(function(){e(window.WebViewJavascriptBridge)}),!1)},e.prototype.first=function(){this.isIOS||this.init((function(e){e.init((function(e,t){t()}))}))},e}();t.default=r}])})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.octopus=t():e.octopus=t()}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var i,r=function(){var e=navigator.userAgent;return{trident:e.indexOf("Trident")>-1,presto:e.indexOf("Presto")>-1,webKit:e.indexOf("AppleWebKit")>-1,gecko:e.indexOf("Gecko")>-1&&-1===e.indexOf("KHTML"),mobile:!!e.match(/AppleWebKit.*Mobile.*/)||e.indexOf("Mobile")>-1,ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:e.indexOf("Android")>-1||e.indexOf("Linux")>-1,iPhone:e.indexOf("iPhone")>-1,iPad:e.indexOf("iPad")>-1,webApp:-1===e.indexOf("Safari"),weixin:e.indexOf("MicroMessenger")>-1,qq:null!==e.match(/\sQQ/i),wpApp:e.indexOf("WangPaiMobile")>-1}},o=r(),c=function(){function e(){this.isIOS=o.ios}return e.prototype.init=function(e){if(this.isIOS){if(window.WebViewJavascriptBridge)return e(window.WebViewJavascriptBridge);if(window.WVJBCallbacks)return window.WVJBCallbacks.push(e);window.WVJBCallbacks=[e];var t=document.createElement("iframe");t.style.display="none",t.src="wvjbscheme://__BRIDGE_LOADED__",document.documentElement.appendChild(t),setTimeout((function(){document.documentElement.removeChild(t)}),0)}else window.WebViewJavascriptBridge?e(window.WebViewJavascriptBridge):document.addEventListener("WebViewJavascriptBridgeReady",(function(){e(window.WebViewJavascriptBridge)}),!1)},e.prototype.first=function(){this.isIOS||this.init((function(e){e.init((function(e,t){t()}))}))},e}(),u=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=new(function(e){function t(){return e.call(this)||this}return u(t,e),t.prototype.callHandler=function(t,n){e.prototype.init.call(this,(function(e){e.callHandler("jsCallJavaAllInOne",t,n)}))},t.prototype.registerHandler=function(t,n){e.prototype.init.call(this,(function(e){e.registerHandler(t,n)}))},t}(c));a.first();var d={callHandler:a.callHandler,registerHandler:a.registerHandler};n.d(t,"getBrowser",(function(){return r})),n.d(t,"jsBridge",(function(){return d}))}])})); |
{ | ||
"name": "@ued2345/octopus-util", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "ued2345 utils", | ||
@@ -5,0 +5,0 @@ "main": "dist/octopus.min.js", |
@@ -23,3 +23,2 @@ ### 技术选型 | ||
├── .babelrc // babel配置文件 | ||
├── octopus.d.ts // 方便typescript项目引入 | ||
├── tsconfig.config.js // ts配置文件 | ||
@@ -70,3 +69,3 @@ ├── README.md // 项目说明文档 | ||
```javascript | ||
import octopus from '@ued2345/octopus' | ||
import * as octopus from '@ued2345/octopus' | ||
const browser = octopus.getBrowser() | ||
@@ -73,0 +72,0 @@ |
@@ -7,5 +7,5 @@ /** | ||
export default { | ||
export { | ||
getBrowser, | ||
jsBridge, | ||
}; |
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"module": "esnext", | ||
"target": "es5", | ||
"noImplicitAny": false, | ||
"removeComments": true, | ||
"preserveConstEnums": true, | ||
"sourceMap": false | ||
"sourceMap": false, | ||
"esModuleInterop": true | ||
}, | ||
@@ -9,0 +11,0 @@ "include": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12553
13
225
81