Socket
Socket
Sign inDemoInstall

@vitrical/utils

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitrical/utils - npm Package Compare versions

Comparing version 1.3.5 to 1.3.6

7

api.js

@@ -11,2 +11,5 @@ "use strict";

}
function isXMLHttpRequestAvailable() {
return typeof XMLHttpRequest !== 'undefined';
}
class ApiError extends Error {

@@ -78,4 +81,4 @@ }

const newStack = new Error().stack;
if (isFetchAvailable()) {
const request = fetch(!query ? url : url + '?' + new URLSearchParams(query), {
if (isFetchAvailable() && !isXMLHttpRequestAvailable()) {
const request = fetch(!query || Object.keys(query).length === 0 ? url : url + '?' + new URLSearchParams(query), {
method,

@@ -82,0 +85,0 @@ body: body && typeof body === 'string' ? body : JSON.stringify(body),

{
"name": "@vitrical/utils",
"version": "1.3.5",
"version": "1.3.6",
"description": "Collection of useful functions and typings",

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

Sorry, the diff of this file is not supported yet

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