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

@aszu/lazy-network

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aszu/lazy-network - npm Package Compare versions

Comparing version 0.4.2-5 to 0.4.2-6

5

dist/utils/StatusResponseInterceptor.js

@@ -37,2 +37,3 @@ "use strict";

var FUNCTIONAL_KEY = Symbol('FUNCTIONAL');
var EMPTY = [];

@@ -84,6 +85,6 @@ var StatusResponseInterceptor = /*#__PURE__*/function (_ResponseListener) {

var status = error.response.status;
var functionalHandlersToExecute = this.handlers[FUNCTIONAL_KEY].filter(function (handler) {
var functionalHandlersToExecute = (this.handlers[FUNCTIONAL_KEY] || EMPTY).filter(function (handler) {
return handler.check(status);
});
var handlersToBeExecuted = [].concat((0, _toConsumableArray2["default"])(this.handlers[status]), (0, _toConsumableArray2["default"])(functionalHandlersToExecute));
var handlersToBeExecuted = [].concat((0, _toConsumableArray2["default"])(this.handlers[status] || EMPTY), (0, _toConsumableArray2["default"])(functionalHandlersToExecute));

@@ -90,0 +91,0 @@ if (handlersToBeExecuted) {

2

package.json
{
"name": "@aszu/lazy-network",
"version": "0.4.2-5",
"version": "0.4.2-6",
"description": "The network layer wrapper, by lazy people for lazy people.",

@@ -5,0 +5,0 @@ "main": "index.js",

import ResponseListener from './ResponseListener'
const FUNCTIONAL_KEY = Symbol('FUNCTIONAL')
const EMPTY = []

@@ -29,7 +30,7 @@ class StatusResponseInterceptor extends ResponseListener {

const functionalHandlersToExecute = this.handlers[FUNCTIONAL_KEY].filter(
const functionalHandlersToExecute = (this.handlers[FUNCTIONAL_KEY] || EMPTY).filter(
handler => handler.check(status)
)
const handlersToBeExecuted = [...this.handlers[status], ...functionalHandlersToExecute]
const handlersToBeExecuted = [...(this.handlers[status] || EMPTY), ...functionalHandlersToExecute]

@@ -36,0 +37,0 @@ if (handlersToBeExecuted) {

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