Socket
Socket
Sign inDemoInstall

express-req-res-helper

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

express-req-res-helper - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

dist/index.js

@@ -32,3 +32,3 @@ "use strict";

const protocol = req.hostname.includes("localhost") ? "http" : "https";
const port = protocol === "http" ? process.env.PORT || "" : "";
const port = protocol === "http" && process.env.PORT ? `:${process.env.PORT}` : "";
return `${protocol}://${req.hostname}${port}${req.originalUrl}`;

@@ -35,0 +35,0 @@ };

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

// @ts-ignore
import { Request } from "express";

@@ -42,3 +43,4 @@

const protocol = req.hostname.includes("localhost") ? "http" : "https";
const port = protocol === "http" ? process.env.PORT || "" :"";
// @ts-ignore
const port = protocol === "http" && process.env.PORT ? `:${process.env.PORT}` :"";
return `${protocol}://${req.hostname}${port}${req.originalUrl}`;

@@ -45,0 +47,0 @@ };

{
"name": "express-req-res-helper",
"version": "0.0.7",
"version": "0.0.8",
"prepublish": "npm run build",

@@ -5,0 +5,0 @@ "description": "this is a utility package to help extract a header from http request",

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