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

fetchtest

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetchtest - npm Package Compare versions

Comparing version 1.0.6 to 1.1.0

10

dist/Test.d.ts

@@ -20,2 +20,4 @@ /// <reference types="node" />

json: any;
redirected: boolean;
url: string;
}>;

@@ -26,2 +28,4 @@ delete(url: string, body?: BodyType, options?: RequestOptions): Promise<{

json: any;
redirected: boolean;
url: string;
}>;

@@ -32,2 +36,4 @@ post(url: string, body?: BodyType, options?: RequestOptions): Promise<{

json: any;
redirected: boolean;
url: string;
}>;

@@ -38,2 +44,4 @@ put(url: string, body?: BodyType, options?: RequestOptions): Promise<{

json: any;
redirected: boolean;
url: string;
}>;

@@ -44,2 +52,4 @@ patch(url: string, body?: BodyType, options?: RequestOptions): Promise<{

json: any;
redirected: boolean;
url: string;
}>;

@@ -46,0 +56,0 @@ private _makeRequest;

14

dist/Test.js

@@ -38,2 +38,12 @@ "use strict";

require('isomorphic-fetch');
function tryJson(response) {
return __awaiter(this, void 0, void 0, function* () {
try {
return yield response.json();
}
catch (e) {
return null;
}
});
}
class Test {

@@ -82,3 +92,5 @@ constructor(app, defaultOptions = {}) {

status: response.status,
json: yield response.json(),
json: yield tryJson(response),
redirected: response.redirected,
url: response.url
};

@@ -85,0 +97,0 @@ });

2

package.json
{
"name": "fetchtest",
"description": "A fetch wrapper for express testing",
"version": "1.0.6",
"version": "1.1.0",
"license": "MIT",

@@ -6,0 +6,0 @@ "main": "dist/lib.js",

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