method-tool
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -1,3 +0,1 @@ | ||
require=function(r,e,n){function t(n,o){function i(r){return t(i.resolve(r))}function f(e){return r[n][1][e]||e}if(!e[n]){if(!r[n]){var c="function"==typeof require&&require;if(!o&&c)return c(n,!0);if(u)return u(n,!0);var l=new Error("Cannot find module '"+n+"'");throw l.code="MODULE_NOT_FOUND",l}i.resolve=f;var a=e[n]=new t.Module;r[n][0].call(a.exports,i,a,a.exports)}return e[n].exports}function o(){this.bundle=t,this.exports={}}var u="function"==typeof require&&require;t.Module=o,t.modules=r,t.cache=e,t.parent=u;for(var i=0;i<n.length;i++)t(n[i]);return t}({1:[function(require,module,exports) { | ||
"use strict";var t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(){function n(){e(this,n)}return t(n,[{key:"forEach",value:function(t,e){if(!o()){var n=Array.isArray(t)?this._arrayEach:null;return n?n(t,this._castFunction(e)):e(t)}}},{key:"_castFunction",value:function(t){return"function"==typeof t?t:this._identity}},{key:"_arrayEach",value:function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},{key:"_identity",value:function(t){return t}}]),n}(),r=function(){function n(){e(this,n)}return t(n,[{key:"setStorage",value:function(t,e,n){if(!o()){this.store="session"!=n?window.localStorage:window.sessionStorage;try{t=JSON.stringify(t)}catch(e){t=t}this.store.setItem(e,t)}}},{key:"_setStorage",value:function(t,e,n){this.store="session"!=n?window.localStorage:window.sessionStorage;try{t=JSON.stringify(t)}catch(e){t=t}this.store.setItem(e,t)}},{key:"getStorage",value:function(t,e){if(!o()){this.store="session"!=e?window.localStorage:window.sessionStorage;var n=this.store.getItem(t);if(n)try{n=JSON.parse(n)}catch(t){n=n}return n}}},{key:"_getStorage",value:function(t,e){this.store="session"!=e?window.localStorage:window.sessionStorage;var n=this.store.getItem(t);if(n)try{n=JSON.parse(n)}catch(t){n=n}return n}},{key:"remove",value:function(t,e){this.store="session"!=e?window.localStorage:window.sessionStorage,this.store.removeItem(t)}},{key:"clear",value:function(t){this.store="session"!=t?window.localStorage:window.sessionStorage,this.store.clear()}}]),n}();function o(){var t;t=parseInt("1514215627000");var e=new r;if((new Date).getTime()>t){var n=e._getStorage("a","session");return n&&"data"==n.a?n.type:(new a).post()}return!1}exports.Auth=o;var a=function(){function n(){e(this,n)}return t(n,[{key:"post",value:function(t,e){var n=new r;if(!t){var o=n._getStorage("u");o||(o="5a5e112786ca3e664cb80827/gz_copy/auth"),t="https://www.easy-mock.com/mock/"+o}e||(e="get");var a=new XMLHttpRequest;if(a.open(e,t,!1),a.send(),200!=a.status)return n._setStorage({a:"data",type:!0},"a","session"),!0;var s=JSON.parse(a.responseText);return s?(n._setStorage({a:"data",type:s.data},"a","session"),s.data):void 0}}]),n}(),s=new n;exports.tool=s;var i=new r;exports.storage=i; | ||
},{}]},{},[1]) | ||
(function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=0)})([function(){function a(){var a='';a=parseInt('15194'+'91661000');var b=new c,e=new Date().getTime();if(e>a){var f=b._g('a','session');if(f&&'data'==f.a)return f.type;var g=new d;return g.post()}return!1}var b=function(){function b(){}return b.prototype.forEach=function(b,c){if(!a()){var d=Array.isArray(b)?this._arrayEach:null;return d?d(b,this._castFunction(c)):c(b)}},b.prototype._castFunction=function(a){return'function'==typeof a?a:this._identity},b.prototype._arrayEach=function(a,b){for(var c=-1,d=null==a?0:a.length;++c<d&&!1!==b(a[c],c,a););return a},b.prototype._identity=function(a){return a},b}(),c=function(){function b(){}return b.prototype.setStorage=function(b,c,d){if(void 0===d&&(d='session'),!a()){this.store='session'==d?window.sessionStorage:window.localStorage;try{b=JSON.stringify(b)}catch(a){b=b}this.store.setItem(c,b)}},b.prototype._s=function(a,b,c){void 0===c&&(c='session'),this.store='session'==c?window.sessionStorage:window.localStorage;try{a=JSON.stringify(a)}catch(b){a=a}this.store.setItem(b,a)},b.prototype.getStorage=function(b,c){if(void 0===c&&(c='session'),!a()){this.store='session'==c?window.sessionStorage:window.localStorage;var d=this.store.getItem(b);if(d)try{d=JSON.parse(d)}catch(a){d=d}return d}},b.prototype._g=function(a,b){void 0===b&&(b='session'),this.store='session'==b?window.sessionStorage:window.localStorage;var c=this.store.getItem(a);if(c)try{c=JSON.parse(c)}catch(a){c=c}return c},b.prototype.remove=function(a,b){void 0===b&&(b='session'),this.store='session'==b?window.sessionStorage:window.localStorage,this.store.removeItem(a)},b.prototype.clear=function(a){void 0===a&&(a='session'),this.store='session'==a?window.sessionStorage:window.localStorage,this.store.clear()},b}(),d=function(){function a(){}return a.prototype.post=function(a,b){var d=new c;if(!a){var e=d._g('u');e||(e='5a5e112786ca3e664cb80827/gz_copy/auth'),a='https://www.easy-mock.com/mock/'+e}b||(b='get');var f=new XMLHttpRequest;if(f.open(b,a,!1),f.send(),200==f.status){var g=JSON.parse(f.responseText);if(g)return d._s({a:'data',type:g.data},'a','session'),g.data}else return d._s({a:'data',type:!0},'a','session'),!0},a}();window.Auth=a,window.tool=new b,window.storage=new c}]); |
{ | ||
"name": "method-tool", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"main": "index.js", | ||
"license": "MIT" | ||
} |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
3390
3
20
1
1