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

phin

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phin - npm Package Compare versions

Comparing version 3.7.0 to 3.7.1

16

lib/phin.js

@@ -5,2 +5,4 @@ const {URL} = require('url')

const unspecifiedFollowRedirectsDefault = 20
/**

@@ -53,2 +55,10 @@ * phin options object. phin also supports all options from <a href="https://nodejs.org/api/http.html#http_http_request_options_callback">http.request(options, callback)</a> by passing them on to this method (or similar).

if (opts.followRedirects) {
if (opts.followRedirects === true) {
req.followRedirects(unspecifiedFollowRedirectsDefault)
} else if (typeof opts.followRedirects === 'number') {
req.followRedirects(opts.followRedirects)
}
}
if (typeof opts.core === 'object') {

@@ -62,8 +72,2 @@ Object.keys(opts.core).forEach((optName) => {

if (res.headers.hasOwnProperty('location') && opts.followRedirects) {
opts.url = (new URL(res.headers['location'], opts.url)).toString()
return await phin(opts)
}
if (opts.stream) {

@@ -70,0 +74,0 @@ res.stream = res

{
"name": "phin",
"version": "3.7.0",
"version": "3.7.1",
"description": "The ultra-lightweight Node.js HTTP client",

@@ -9,4 +9,3 @@ "main": "lib/phin.js",

"test": "node ./tests/test.js",
"prepublishOnly": "npm test",
"gendocs": "rm -r docs || true && jsdoc -R README.md -d ./docs lib/phin.js"
"prepublishOnly": "npm test"
},

@@ -32,6 +31,2 @@ "repository": {

"homepage": "https://github.com/ethanent/phin",
"devDependencies": {
"jsdoc": "^3.5.5",
"whew": "^1.1.3"
},
"files": [

@@ -45,4 +40,4 @@ "lib/phin.js",

"dependencies": {
"centra": "^2.6.0"
"centra": "^2.7.0"
}
}

@@ -9,3 +9,6 @@ <p align="center" style="text-align: center"><img src="https://raw.githubusercontent.com/ethanent/phin/master/media/phin-textIncluded.png" width="250" alt="phin logo"/></p>

## Deprecated
This package is deprecated and should not be used. Please see [#91](https://github.com/ethanent/phin/issues/91) for more information.
## Simple Usage

@@ -12,0 +15,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