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

muhb

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

muhb - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

19

lib/index.js

@@ -11,3 +11,3 @@ const http = require('http');

path: url.pathname + url.search,
headers: headers || {}
headers: typeof headers == 'object' ? headers : {}
};

@@ -26,3 +26,3 @@ let req = http.request(options, res => {

req.on('error', reject);
if(data)
if(typeof data == 'string')
req.write(data);

@@ -39,11 +39,9 @@ req.end();

post(url, headersOrBody, body){
headers = typeof headersOrBody == 'object' ? headersOrBody : {};
body = typeof headersOrBody == 'object' ? body : headersOrBody;
return request(url, headers, 'POST', body || '');
body = body || headersOrBody;
return request(url, headersOrBody, 'POST', body);
},
patch(url, headersOrBody, body){
headers = typeof headersOrBody == 'object' ? headersOrBody : {};
body = typeof headersOrBody == 'object' ? body : headersOrBody;
return request(url, headers, 'PATCH', body || '');
body = body || headersOrBody;
return request(url, headersOrBody, 'PATCH', body);
},

@@ -56,5 +54,4 @@

put(url, headersOrBody, body){
headers = typeof headersOrBody == 'object' ? headersOrBody : {};
body = typeof headersOrBody == 'object' ? body : headersOrBody;
return request(url, headers, 'PUT', body || '');
body = body || headersOrBody;
return request(url, headersOrBody, 'PUT', body);
},

@@ -61,0 +58,0 @@

{
"name": "muhb",
"version": "0.0.0",
"version": "0.0.1",
"description": "A simple set of functions for coding easy to read HTTP requests.",
"main": "index.js",
"main": "lib/index.js",
"scripts": {

@@ -7,0 +7,0 @@ "test": "mocha -b --no-diff test/spec.js"

Sorry, the diff of this file is not supported yet

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