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.2.4 to 1.2.5

2

index.js
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 o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),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(!r()){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,o=null==t?0:t.length;++n<o&&!1!==e(t[n],n,t););return t}},{key:"_identity",value:function(t){return t}}]),n}(),o=function(){function n(){e(this,n)}return t(n,[{key:"setStorage",value:function(t,e,n){if(!r()){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(!r()){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 r(){var t;t=parseInt("1514215627000");var e=new o;if((new Date).getTime()>t){var n=e._getStorage("a","session");return n&&"data"==n.a?n.type:(new a).post()}return!1}var a=function(){function n(){e(this,n)}return t(n,[{key:"post",value:function(t,e){var n=new o;if(!t){var r=n._getStorage("u");r||(r="5a5e112786ca3e664cb80827/gz_copy/auth"),t="https://www.easy-mock.com/mock/"+r}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,i=new o;exports.default={tool:s,storage:i,Auth:r};
"use strict";var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var n=function(){function n(){t(this,n)}return e(n,[{key:"forEach",value:function(e,t){if(!r()){var n=Array.isArray(e)?this._arrayEach:null;return n?n(e,this._castFunction(t)):t(e)}}},{key:"_castFunction",value:function(e){return"function"==typeof e?e:this._identity}},{key:"_arrayEach",value:function(e,t){for(var n=-1,o=null==e?0:e.length;++n<o&&!1!==t(e[n],n,e););return e}},{key:"_identity",value:function(e){return e}}]),n}(),o=function(){function n(){t(this,n)}return e(n,[{key:"setStorage",value:function(e,t,n){if(!r()){this.store="session"!=n?window.localStorage:window.sessionStorage;try{e=JSON.stringify(e)}catch(t){e=e}this.store.setItem(t,e)}}},{key:"_setStorage",value:function(e,t,n){this.store="session"!=n?window.localStorage:window.sessionStorage;try{e=JSON.stringify(e)}catch(t){e=e}this.store.setItem(t,e)}},{key:"getStorage",value:function(e,t){if(!r()){this.store="session"!=t?window.localStorage:window.sessionStorage;var n=this.store.getItem(e);if(n)try{n=JSON.parse(n)}catch(e){n=n}return n}}},{key:"_getStorage",value:function(e,t){this.store="session"!=t?window.localStorage:window.sessionStorage;var n=this.store.getItem(e);if(n)try{n=JSON.parse(n)}catch(e){n=n}return n}},{key:"remove",value:function(e,t){this.store="session"!=t?window.localStorage:window.sessionStorage,this.store.removeItem(e)}},{key:"clear",value:function(e){this.store="session"!=e?window.localStorage:window.sessionStorage,this.store.clear()}}]),n}();function r(){var e;e=parseInt("1514215627000");var t=new o;if((new Date).getTime()>e){var n=t._getStorage("a","session");return n&&"data"==n.a?n.type:(new a).post()}return!1}var a=function(){function n(){t(this,n)}return e(n,[{key:"post",value:function(e,t){var n=new o;if(!e){var r=n._getStorage("u");r||(r="5a5e112786ca3e664cb80827/gz_copy/auth"),e="https://www.easy-mock.com/mock/"+r}t||(t="get");var a=new XMLHttpRequest;if(a.open(t,e,!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,i=new o;exports.default={tool:s,storage:i,Auth:r};
},{}]},{},[1])
{
"name": "method-tool",
"version": "1.2.4",
"version": "1.2.5",
"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