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 2.6.0 to 2.7.0

22

lib/phin.js

@@ -44,9 +44,5 @@ const http = require('http')

var addr
if (typeof opts === 'object') {
addr = url.parse(opts.url)
} else {
addr = url.parse(opts)
}
var options = {
const addr = typeof opts === 'object' ? url.parse(opts.url) : url.parse(opts)
let options = {
'hostname': addr.hostname,

@@ -84,5 +80,5 @@ 'port': addr.port || (addr.protocol.toLowerCase() === 'http:' ? 80 : 443),

var req
let req
const resHandler = (res) => {
var stream = res
let stream = res
if (options.compressed === true) {

@@ -145,3 +141,3 @@ if (res.headers['content-encoding'] === 'gzip') {

if (opts.hasOwnProperty('data')) {
var postData = opts.data
let postData = opts.data

@@ -152,3 +148,4 @@ if (!(opts.data instanceof Buffer) && typeof opts.data === 'object') {

postData = qs.stringify(opts.data)
} else {
}
else {
try {

@@ -174,3 +171,4 @@ postData = JSON.stringify(opts.data)

reject(err)
} else {
}
else {
resolve(res)

@@ -177,0 +175,0 @@ }

{
"name": "phin",
"version": "2.6.0",
"version": "2.7.0",
"description": "Ultra-simple, lightweight, dependency-free Node.JS HTTP request client",

@@ -5,0 +5,0 @@ "main": "lib/phin.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