Socket
Socket
Sign inDemoInstall

@schibsted/niche-utils

Package Overview
Dependencies
Maintainers
9
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schibsted/niche-utils - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

2

lib/fetch/fetchWrapper.d.ts

@@ -1,1 +0,1 @@

export declare const fetchWrapper: <T>(url: string, options?: RequestInit, timeout?: number, timeoutCallback?: () => void) => Promise<T>;
export declare const fetchWrapper: <T>(url: string, options?: RequestInit, timeout?: number) => Promise<T>;

@@ -11,9 +11,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import { FetchError } from './fetchError';
export const fetchWrapper = (url, options, timeout, timeoutCallback) => __awaiter(void 0, void 0, void 0, function* () {
export const fetchWrapper = (url, options, timeout) => __awaiter(void 0, void 0, void 0, function* () {
let signal;
if (timeout) {
signal = AbortSignal.timeout(timeout);
if (timeoutCallback) {
signal.onabort = timeoutCallback;
}
}

@@ -20,0 +17,0 @@ const response = yield fetch(url, Object.assign(Object.assign({}, options), { signal }));

{
"name": "@schibsted/niche-utils",
"version": "0.6.1",
"version": "0.6.2",
"repository": {

@@ -28,3 +28,3 @@ "type": "git",

},
"gitHead": "90c2c4d7b72a8d3c5afd1444b318e08795cb6ae1"
"gitHead": "fc63e4e3bc5209bf0ccbe4a9810989f4704e15a4"
}
import { FetchError } from './fetchError';
export const fetchWrapper = async <T>(
url: string,
options?: RequestInit,
timeout?: number,
timeoutCallback?: () => void
): Promise<T> => {
export const fetchWrapper = async <T>(url: string, options?: RequestInit, timeout?: number): Promise<T> => {
let signal: AbortSignal | undefined;

@@ -13,6 +8,2 @@

signal = AbortSignal.timeout(timeout);
if (timeoutCallback) {
signal.onabort = timeoutCallback;
}
}

@@ -19,0 +10,0 @@

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