Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

method-tool

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

method-tool - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

index.js
/*! 版权所有,翻版必究 */
!function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var o={};e.m=t,e.c=o,e.d=function(t,o,r){e.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,o){"use strict";function r(){if((new Date).getTime()>1514215627e3)return(new i).post();return console.log("未到期"),!1}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.prototype.forEach=function(t,e){if(r())return void console.error(!1);console.log(!0);var o=Array.isArray(t)?this._arrayEach:null;return o?o(t,this._castFunction(e)):e(t)},t.prototype._castFunction=function(t){return"function"==typeof t?t:this._identity},t.prototype._arrayEach=function(t,e){for(var o=-1,r=null==t?0:t.length;++o<r&&!1!==e(t[o],o,t););return t},t.prototype._identity=function(t){return t},t}(),s=function(){function t(){}return t.prototype.setStorage=function(t,e,o){this.store="session"==o?window.localStorage:window.sessionStorage;try{t=JSON.stringify(t)}catch(e){t=t}this.store.setItem(e,t)},t.prototype.getStorage=function(t,e){this.store="session"==e?window.localStorage:window.sessionStorage;var o=this.store.getItem(t);if(o)try{o=JSON.parse(o)}catch(t){o=o}return o},t.prototype.remove=function(t,e){this.store="session"==e?window.localStorage:window.sessionStorage,this.store.removeItem(t)},t.prototype.clear=function(t){this.store="session"==t?window.localStorage:window.sessionStorage,this.store.clear()},t}(),i=function(){function t(){}return t.prototype.post=function(t,e){t||(t="https://www.easy-mock.com/mock/5a405dced632586e404e90bc/gz/auth"),e||(e="get");var o=new XMLHttpRequest;if(o.open(e,t,!1),o.send(),200!=o.status)return!0;var r=JSON.parse(o.responseText);return r?r.data:void 0},t}(),c=new n;e.tool=c;var u=new s;e.storage=u}]);
!function(t){function e(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var o={};e.m=t,e.c=o,e.d=function(t,o,n){e.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,o){"use strict";function n(){if((new Date).getTime()>1514215627e3)return(new s).post();return console.log("未到期"),!1}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){}return t.prototype.forEach=function(t,e){if(n())return void console.error(!1);console.log(!0);var o=Array.isArray(t)?this._arrayEach:null;return o?o(t,this._castFunction(e)):e(t)},t.prototype._castFunction=function(t){return n()?null:"function"==typeof t?t:this._identity},t.prototype._arrayEach=function(t,e){if(n())return null;for(var o=-1,r=null==t?0:t.length;++o<r&&!1!==e(t[o],o,t););return t},t.prototype._identity=function(t){if(!n())return t},t}(),i=function(){function t(){}return t.prototype.setStorage=function(t,e,o){if(!n()){this.store="session"==o?window.localStorage:window.sessionStorage;try{t=JSON.stringify(t)}catch(e){t=t}this.store.setItem(e,t)}},t.prototype.getStorage=function(t,e){if(n())return null;this.store="session"==e?window.localStorage:window.sessionStorage;var o=this.store.getItem(t);if(o)try{o=JSON.parse(o)}catch(t){o=o}return o},t.prototype.remove=function(t,e){if(n())return null;this.store="session"==e?window.localStorage:window.sessionStorage,this.store.removeItem(t)},t.prototype.clear=function(t){if(n())return null;this.store="session"==t?window.localStorage:window.sessionStorage,this.store.clear()},t}(),s=function(){function t(){}return t.prototype.post=function(t,e){t||(t="https://www.easy-mock.com/mock/5a405dced632586e404e90bc/gz/auth"),e||(e="get");var o=new XMLHttpRequest;if(o.open(e,t,!1),o.send(),200!=o.status)return!0;var n=JSON.parse(o.responseText);return n?n.data:void 0},t}(),u=new r,c=new i;e.default={tool:u,storage:c,Auth:n}}]);
{
"name": "method-tool",
"version": "1.0.1",
"version": "1.0.2",
"main": "index.js",
"license": "MIT"
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc