@ued2345/octopus-util
Advanced tools
Comparing version 1.1.5 to 1.1.6-0
@@ -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.OcUtil=t():e.OcUtil=t()}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=2)}([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)}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t,n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3);var r="expires="+o.toUTCString();document.cookie=e+"="+t+";path=/;;"+r}},function(e,t,n){"use strict";var o=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=o(n(0)),i=o(n(3)),u=o(n(4)),c=o(n(6)),a=o(n(1)),l=o(n(7)),f=o(n(8));e.exports.default=e.exports={getBrowser:r.default,getInApp:i.default,JsBridge:u.default,getCookie:c.default,setCookie:a.default,delCookie:l.default,VuePlugin:f.default}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return!!(navigator.userAgent.indexOf(e)>-1)}},function(e,t,n){"use strict";var o,r=(o=function(e,t){return(o=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}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var u=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}(i(n(5)).default));u.first(),t.default={callHandler:u.callHandler,registerHandler:u.registerHandler}},function(e,t,n){"use strict";var o=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=o(n(0)).default(),i=function(){function e(){this.isIOS=r.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=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){for(var t=document.cookie.replace(/\s/g,"").split(";"),n=0;n<t.length;n++){var o=t[n].split("=");if(o[0]==e)return decodeURIComponent(o[1])}return""}},function(e,t,n){"use strict";var o=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=o(n(1));t.default=function(e){r.default(e,"",-1)}},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=r(n(9));t.default={install:function(e,t){Object.keys(i.default).forEach((function(n){"object"===o(i.default[n])?e.directive(n,i.default[n]):"function"==typeof i.default[n]&&e.directive(n,new i.default[n](t[n]))}))}}},function(e,t,n){"use strict";var o=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=o(n(10));t.default={bang:r.default}},function(e,t,n){"use strict";var o,r=function(){return(r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};t.__esModule=!0,function(e){e.Exposure="exposure",e.Click="click",e.Mounted="mounted"}(o||(o={}));var i=function(e){var t=this;this.inserted=function(e,n,r,i){var u,c,a;switch(n.arg){case o.Exposure:new Promise((function(n,o){"IMG"===e.tagName?(e.onload=function(){var o=e.getAttribute("data-src"),r=e.getAttribute("src");((o?o===r:r)||t.config.imgErrExposure)&&n(!0)},e.onerror=function(e){t.config.imgErrExposure?n(!0):o(e)}):n(!0)})).then((function(o){o&&IntersectionObserver&&(e.observer=new IntersectionObserver((function(o){o[0].intersectionRatio>=.95&&(t.callback(e,n,r,i),t.config.exposureMulti||e.observer.unobserve(e))}),{root:null,threshold:[.95]}),e.observer.observe(e))})).catch((function(e){console.error(e)}));break;case o.Click:var l=(u=t.callback,c=(c=t.config.clickThrottleInterval)||2e3,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this,o=+new Date;a&&o-a>0&&o-a<c||(a=o,u.apply(n,e))});e.bangClickCb=function(){l(e,n,r,i)},e.addEventListener("click",e.bangClickCb);break;case o.Mounted:t.callback(e,n,r,i);break;default:t.callback(e,n,r,i)}},this.unbind=function(e,n){switch(n.arg){case o.Exposure:t.config.exposureMulti&&e.observer&&e.observer.unobserve(e);case o.Click:e.removeEventListener("click",e.bangClickCb)}},this.config=r(r({},this.DefaultConfig),e),this.callback=this.config.cb};t.default=i}])})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OcUtil=t():e.OcUtil=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=2)}([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)}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t,n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3);var o="expires="+r.toUTCString();document.cookie=e+"="+t+";path=/;;"+o}},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=r(n(0)),i=r(n(3)),u=r(n(4)),c=r(n(6)),a=r(n(1)),s=r(n(7)),l=r(n(8)),f=r(n(11));e.exports.default=e.exports={getBrowser:o.default,getInApp:i.default,JsBridge:u.default,getCookie:c.default,setCookie:a.default,delCookie:s.default,VuePlugin:l.default,CatchError:f.default}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return!!(navigator.userAgent.indexOf(e)>-1)}},function(e,t,n){"use strict";var r,o=(r=function(e,t){return(r=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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var u=new(function(e){function t(){return e.call(this)||this}return o(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}(i(n(5)).default));u.first(),t.default={callHandler:u.callHandler,registerHandler:u.registerHandler}},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=r(n(0)).default(),i=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}();t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){for(var t=document.cookie.replace(/\s/g,"").split(";"),n=0;n<t.length;n++){var r=t[n].split("=");if(r[0]==e)return decodeURIComponent(r[1])}return""}},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=r(n(1));t.default=function(e){o.default(e,"",-1)}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=o(n(9));t.default={install:function(e,t){Object.keys(i.default).forEach((function(n){"object"===r(i.default[n])?e.directive(n,i.default[n]):"function"==typeof i.default[n]&&e.directive(n,new i.default[n](t[n]))}))}}},function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=r(n(10));t.default={bang:o.default}},function(e,t,n){"use strict";var r,o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};t.__esModule=!0,function(e){e.Exposure="exposure",e.Click="click",e.Mounted="mounted"}(r||(r={}));var i=function(e){var t=this;this.inserted=function(e,n,o,i){var u,c,a;switch(n.arg){case r.Exposure:new Promise((function(n,r){"IMG"===e.tagName?(e.onload=function(){var r=e.getAttribute("data-src"),o=e.getAttribute("src");((r?r===o:o)||t.config.imgErrExposure)&&n(!0)},e.onerror=function(e){t.config.imgErrExposure?n(!0):r(e)}):n(!0)})).then((function(r){r&&IntersectionObserver&&(e.observer=new IntersectionObserver((function(r){r[0].intersectionRatio>=.95&&(t.callback(e,n,o,i),t.config.exposureMulti||e.observer.unobserve(e))}),{root:null,threshold:[.95]}),e.observer.observe(e))})).catch((function(e){console.error(e)}));break;case r.Click:var s=(u=t.callback,c=(c=t.config.clickThrottleInterval)||2e3,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this,r=+new Date;a&&r-a>0&&r-a<c||(a=r,u.apply(n,e))});e.bangClickCb=function(){s(e,n,o,i)},e.addEventListener("click",e.bangClickCb);break;case r.Mounted:t.callback(e,n,o,i);break;default:t.callback(e,n,o,i)}},this.unbind=function(e,n){switch(n.arg){case r.Exposure:t.config.exposureMulti&&e.observer&&e.observer.unobserve(e);case r.Click:e.removeEventListener("click",e.bangClickCb)}},this.config=o(o({},this.DefaultConfig),e),this.callback=this.config.cb};t.default=i},function(e,t,n){"use strict";var r,o,i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};t.__esModule=!0,function(e){e[e.ERROR=1]="ERROR",e[e.WARNING=2]="WARNING",e[e.INFO=3]="INFO"}(r||(r={})),function(e){e.SCRIP="ERROR_SCRIPT",e.LINK="ERROR_STYLE",e.IMG="ERROR_IMAGE",e.AUDIO="ERROR_AUDIO",e.VIDEO="ERROR_VIDEO"}(o||(o={}));var u=function(){function e(e,t){this.DefaultConfig={isReportNow:!1,delay:3e3,random:1,repeatNum:3,reportUnhandledRejection:!0,reportFun:function(){}},this.config=i(i({},this.DefaultConfig),t),this.reportFun=this.config.reportFun,this.errorList=[],this.Vue=e,this.errorMap={}}return e.getInstance=function(e,t){return this.instance instanceof this||(this.instance=new this(e,t),this.instance.registerError()),this.instance},e.prototype.registerError=function(){var e=this;try{var t=window.onerror;window.onerror=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=n[0],u=n[1],c=n[2],a=n[3],s=n[4],l=i;s&&s.stack&&(l=e.runStackMsgFun(s)),e.errorList.push({type:"ERROR_RUNTIME",level:r.ERROR,message:l,url:u,col:a,row:c}),e.reportErrorFun(),t&&t.apply(window,n)}}catch(e){console.log(e)}try{window.addEventListener("error",(function(t){var n=t.target||t.srcElement;n!==window&&n.nodeName&&o[n.nodeName.toUpperCase()]&&(e.errorList.push({type:o[n.nodeName.toUpperCase()],level:r.ERROR,message:n.baseURI+"@"+(n.src||n.href),url:n.src||n.href}),e.reportErrorFun())}),!0)}catch(e){console.log(e)}e.Vue.config.errorHandler=function(t,n,o){var i,u=t&&t.msg?t.msg:t;t&&t.stack&&(i=e.runStackVueFun(t)),e.errorList.push({type:"ERROR_VUE",level:r.ERROR,message:o+"@"+u,col:Number(i.col),row:Number(i.row),url:i.url||location.href}),e.reportErrorFun()},e.config.reportUnhandledRejection&&window.addEventListener("unhandledrejection",(function(t){console.log(t),console.log("\n",t.reason);var n=e.runStackMsgFun(t.reason);e.errorList.push({type:"ERROR_REJECT",level:r.WARNING,message:n,url:location.href}),e.reportErrorFun()}))},e.prototype.runStackMsgFun=function(e){var t=e.stack.replace(/\n/gi,"").split(/\bat\b/).slice(0,9).join("@").replace(/\?[^:]+/gi,""),n=e.toString();return t.indexOf(n)<0&&(t=n+"@"+t),t},e.prototype.runStackVueFun=function(e){var t="",n=1,r=1,o=e.stack.match(/https?:\/\/[^\n]+/),i=o?o[0]:"",u=/https?:\/\/(\S)*\.js/;u.test(i)&&(t=i.match(u)[0]);var c=i.match(/:(\d+):(\d+)/);return c&&c.length>=3&&(n=c[1],r=c[2]),{url:t,col:Number(n),row:Number(r)}},e.prototype.isRepeatFun=function(e){var t=e.message;return(this.errorMap[t]=(parseInt(this.errorMap[t],10)||0)+1)>this.config.repeatNum},e.prototype.reportErrorFun=function(){var e=this;Math.random()>=this.config.random||setTimeout((function(){for(var t=function(){var t=e.errorList.pop();if(t.message=(t.message+""||"").substr(0,500),e.isRepeatFun(t))return"continue";e.config.isReportNow?e.reportFun(t):setTimeout((function(){e.reportFun(t)}),e.config.delay*e.errorList.length)};e.errorList.length;)t()}),this.config.delay)},e}();t.default=u}])})); |
{ | ||
"name": "@ued2345/octopus-util", | ||
"version": "1.1.5", | ||
"version": "1.1.6-0", | ||
"description": "ued2345 utils", | ||
@@ -5,0 +5,0 @@ "main": "dist/octopus-util.min.js", |
@@ -11,2 +11,3 @@ /** | ||
import VuePlugin from "./vuePlugin/vuePlugin"; | ||
import CatchError from "./monitor/catchError"; | ||
@@ -20,3 +21,4 @@ module.exports.default = module.exports = { | ||
delCookie, | ||
VuePlugin // vue工具(内含insert方法) | ||
VuePlugin, // vue工具(内含insert方法) | ||
CatchError, | ||
}; |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
36597
21
724
0
2