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

follow-redirects

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

follow-redirects - npm Package Compare versions

Comparing version 1.15.7 to 1.15.8

13

index.js

@@ -10,13 +10,6 @@ var url = require("url");

// Disaster prevention
/* istanbul ignore next */
if (nope.isBrowser()) {
module.exports = nope;
return;
}
// Whether to use the native URL object or the legacy url module
var useNativeURL = false;
try {
assert(new URL());
assert(new URL(""));
}

@@ -496,3 +489,3 @@ catch (error) {

// Wraps the key/value object of protocols with redirect functionality
function wrap(protocols) {
var wrap = nope.wrap || function wrap(protocols) {
// Default settings

@@ -559,3 +552,3 @@ var exports = {

return exports;
}
};

@@ -562,0 +555,0 @@ function noop() { /* empty */ }

// follow-redirects absolutely must not be used in the browser.
// Neither should the `http` and `http` modules it replaces, yet here we are.
// Neither should the `http` and `https` modules it replaces, yet here we are.
var http = require("http");
var https = require("https");
/* istanbul ignore next */ // eslint-disable-next-line no-undef
// eslint-disable-next-line no-undef
var browser = typeof window !== "undefined" && typeof window.document !== "undefined";

@@ -12,10 +12,9 @@

https: https,
wrap: function () {
// Honestly looking forward to this bug report
throw new Error("Best viewed in Internet Explorer");
wrap: browser && function (module) {
// eslint-disable-next-line
console.warn("Exclude follow-redirects from browser builds.");
return module;
},
isBrowser() {
/* istanbul ignore next */ // eslint-disable-next-line
return browser && !!console.warn("Exclude follow-redirects from browser builds.");
},
};
/* istanbul ignore file */
{
"name": "follow-redirects",
"version": "1.15.7",
"version": "1.15.8",
"description": "HTTP and HTTPS modules that follow redirects.",

@@ -5,0 +5,0 @@ "license": "MIT",

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