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
3
Versions
240
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 5.8.1 to 5.9.0

index.d.ts

6

dist/requester.xhr.d.ts

@@ -1,5 +0,3 @@

import { Requester } from '@algolia/client-common';
function m(){function r(t){return new Promise(s=>{let e=new XMLHttpRequest;e.open(t.method,t.url,!0),Object.keys(t.headers).forEach(n=>e.setRequestHeader(n,t.headers[n]));let i=(n,a)=>setTimeout(()=>{e.abort(),s({status:0,content:a,isTimedOut:!0});},n),u=i(t.connectTimeout,"Connection timeout"),o;e.onreadystatechange=()=>{e.readyState>e.OPENED&&o===void 0&&(clearTimeout(u),o=i(t.responseTimeout,"Socket timeout"));},e.onerror=()=>{e.status===0&&(clearTimeout(u),clearTimeout(o),s({content:e.responseText||"Network request failed",status:e.status,isTimedOut:!1}));},e.onload=()=>{clearTimeout(u),clearTimeout(o),s({content:e.responseText,status:e.status,isTimedOut:!1});},e.send(t.data);})}return {send:r}}
declare function createXhrRequester(): Requester;
export { createXhrRequester };
export { m as createXhrRequester };
{
"name": "@algolia/requester-browser-xhr",
"version": "5.8.1",
"version": "5.9.0",
"description": "Promise-based request library for browser using xhr.",

@@ -24,4 +24,4 @@ "repository": {

"dist",
"src",
"index.ts"
"index.d.ts",
"index.js"
],

@@ -35,11 +35,11 @@ "scripts": {

"dependencies": {
"@algolia/client-common": "5.8.1"
"@algolia/client-common": "5.9.0"
},
"devDependencies": {
"@arethetypeswrong/cli": "0.16.4",
"@types/node": "22.7.4",
"@types/node": "22.7.5",
"jsdom": "25.0.1",
"publint": "0.2.11",
"tsup": "8.3.0",
"typescript": "5.6.2",
"typescript": "5.6.3",
"vitest": "2.1.2",

@@ -46,0 +46,0 @@ "xhr-mock": "2.5.1"

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