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

@algolia/requester-browser-xhr

Package Overview
Dependencies
Maintainers
60
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algolia/requester-browser-xhr - npm Package Compare versions

Comparing version 4.0.0-beta.9 to 4.0.0-beta.10

10

dist/requester-browser-xhr.cjs.js

@@ -24,8 +24,8 @@ 'use strict';

// eslint-disable-next-line functional/no-let
let socketTimeout;
let responseTimeout;
// eslint-disable-next-line functional/immutable-data
baseRequester.onreadystatechange = () => {
if (baseRequester.readyState > baseRequester.OPENED && socketTimeout === undefined) {
if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) {
clearTimeout(connectTimeout);
socketTimeout = createTimeout(request.socketTimeout, 'Socket timeout');
responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout');
}

@@ -38,3 +38,3 @@ };

clearTimeout(connectTimeout);
clearTimeout(socketTimeout);
clearTimeout(responseTimeout);
resolve({

@@ -50,3 +50,3 @@ content: baseRequester.responseText || 'Network request failed',

clearTimeout(connectTimeout);
clearTimeout(socketTimeout);
clearTimeout(responseTimeout);
resolve({

@@ -53,0 +53,0 @@ content: baseRequester.responseText,

@@ -20,8 +20,8 @@ function createBrowserXhrRequester() {

// eslint-disable-next-line functional/no-let
let socketTimeout;
let responseTimeout;
// eslint-disable-next-line functional/immutable-data
baseRequester.onreadystatechange = () => {
if (baseRequester.readyState > baseRequester.OPENED && socketTimeout === undefined) {
if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) {
clearTimeout(connectTimeout);
socketTimeout = createTimeout(request.socketTimeout, 'Socket timeout');
responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout');
}

@@ -34,3 +34,3 @@ };

clearTimeout(connectTimeout);
clearTimeout(socketTimeout);
clearTimeout(responseTimeout);
resolve({

@@ -46,3 +46,3 @@ content: baseRequester.responseText || 'Network request failed',

clearTimeout(connectTimeout);
clearTimeout(socketTimeout);
clearTimeout(responseTimeout);
resolve({

@@ -49,0 +49,0 @@ content: baseRequester.responseText,

{
"name": "@algolia/requester-browser-xhr",
"version": "4.0.0-beta.9",
"version": "4.0.0-beta.10",
"private": false,

@@ -16,4 +16,4 @@ "description": "Promise-based request library for browser using xhr.",

"dependencies": {
"@algolia/requester-common": "4.0.0-beta.9"
"@algolia/requester-common": "4.0.0-beta.10"
}
}
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